File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,10 @@ impl Cfg {
8181 } ,
8282 MetaItemKind :: List ( ref items) => {
8383 let mut sub_cfgs = items. iter ( ) . map ( Cfg :: parse_nested) ;
84- match & * name. as_str ( ) {
85- " all" => sub_cfgs. fold ( Ok ( Cfg :: True ) , |x, y| Ok ( x? & y?) ) ,
86- " any" => sub_cfgs. fold ( Ok ( Cfg :: False ) , |x, y| Ok ( x? | y?) ) ,
87- " not" => if sub_cfgs. len ( ) == 1 {
84+ match name {
85+ sym :: all => sub_cfgs. fold ( Ok ( Cfg :: True ) , |x, y| Ok ( x? & y?) ) ,
86+ sym :: any => sub_cfgs. fold ( Ok ( Cfg :: False ) , |x, y| Ok ( x? | y?) ) ,
87+ sym :: not => if sub_cfgs. len ( ) == 1 {
8888 Ok ( !sub_cfgs. next ( ) . unwrap ( ) ?)
8989 } else {
9090 Err ( InvalidCfgError {
Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ pub fn make_test(s: &str,
407407 Ok ( Some ( item) ) => {
408408 if !found_main {
409409 if let ast:: ItemKind :: Fn ( ..) = item. node {
410- if item. ident . as_str ( ) == " main" {
410+ if item. ident . name == sym :: main {
411411 found_main = true ;
412412 }
413413 }
You can’t perform that action at this time.
0 commit comments