File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use std::fs;
33use std:: iter;
44use std:: path:: { Path , PathBuf } ;
55use syn;
6+ use syn:: ext:: IdentExt ;
67use crate :: error:: Error ;
78
89
@@ -56,10 +57,10 @@ impl FileCollector {
5657 syn:: Item :: Mod ( ref im) => im,
5758 _ => continue ,
5859 } ;
59- mod_path. push ( im. ident . to_string ( ) ) ;
60+ mod_path. push ( im. ident . unraw ( ) . to_string ( ) ) ;
6061 if let Some ( ( _, ref inline_items) ) = im. content {
6162 let name = path_attr_value ( & im. attrs ) ?
62- . unwrap_or_else ( || im. ident . to_string ( ) ) ;
63+ . unwrap_or_else ( || im. ident . unraw ( ) . to_string ( ) ) ;
6364 let module = parent_module. iter ( ) . copied ( ) . chain ( iter:: once ( & name as & _ ) )
6465 . collect :: < Vec < _ > > ( ) ;
6566 self . walk_items ( inline_items, base_path, mod_path. clone ( ) , & module) ?;
@@ -72,7 +73,7 @@ impl FileCollector {
7273 path. push ( attr_path) ;
7374 self . parse ( path, mod_path. clone ( ) , false ) ?;
7475 } else {
75- let name = im. ident . to_string ( ) ;
76+ let name = im. ident . unraw ( ) . to_string ( ) ;
7677 // Try `foo/mod.rs` first; if it doesn't exist, try `foo.rs` instead.
7778 path. push ( name) ;
7879 path. push ( "mod.rs" ) ;
You can’t perform that action at this time.
0 commit comments