@@ -154,7 +154,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
154
154
} else {
155
155
// An internal module (`mod foo { /* ... */ }`);
156
156
if let Some ( path) = find_path_value ( & item. attrs ) {
157
- let path = Path :: new ( & path. as_str ( ) ) . to_path_buf ( ) ;
157
+ let path = Path :: new ( & * path. as_str ( ) ) . to_path_buf ( ) ;
158
158
Ok ( Some ( SubModKind :: InternalWithPath ( path) ) )
159
159
} else {
160
160
Ok ( Some ( SubModKind :: Internal ( item) ) )
@@ -288,7 +288,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
288
288
289
289
fn push_inline_mod_directory ( & mut self , id : ast:: Ident , attrs : & [ ast:: Attribute ] ) {
290
290
if let Some ( path) = find_path_value ( attrs) {
291
- self . directory . path . push ( & path. as_str ( ) ) ;
291
+ self . directory . path . push ( & * path. as_str ( ) ) ;
292
292
self . directory . ownership = DirectoryOwnership :: Owned { relative : None } ;
293
293
} else {
294
294
// We have to push on the current module name in the case of relative
@@ -300,10 +300,10 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
300
300
if let DirectoryOwnership :: Owned { relative } = & mut self . directory . ownership {
301
301
if let Some ( ident) = relative. take ( ) {
302
302
// remove the relative offset
303
- self . directory . path . push ( ident. as_str ( ) ) ;
303
+ self . directory . path . push ( & * ident. as_str ( ) ) ;
304
304
}
305
305
}
306
- self . directory . path . push ( & id. as_str ( ) ) ;
306
+ self . directory . path . push ( & * id. as_str ( ) ) ;
307
307
}
308
308
}
309
309
0 commit comments