mirror of https://github.com/rwf2/Rocket.git
Simplify a branch in check_config macro.
This commit is contained in:
parent
05bed92272
commit
63d31e8082
|
@ -193,10 +193,7 @@ mod test {
|
||||||
|
|
||||||
macro_rules! check_config {
|
macro_rules! check_config {
|
||||||
($rconfig:expr => { $($param:tt)+ }) => (
|
($rconfig:expr => { $($param:tt)+ }) => (
|
||||||
match $rconfig {
|
check_config!($rconfig, Config { $($param)+ })
|
||||||
Ok(config) => assert_eq!(config.active(), &Config { $($param)+ }),
|
|
||||||
Err(e) => panic!("Config {} failed: {:?}", stringify!($rconfig), e)
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
|
|
||||||
($rconfig:expr, $econfig:expr) => (
|
($rconfig:expr, $econfig:expr) => (
|
||||||
|
|
Loading…
Reference in New Issue