Add Ident::as_str
helper
This commit is contained in:
parent
189c0a1297
commit
1e4269cb83
25 changed files with 50 additions and 46 deletions
|
@ -6054,7 +6054,7 @@ impl<'a> Parser<'a> {
|
|||
self.directory.path.to_mut().push(&path.as_str());
|
||||
self.directory.ownership = DirectoryOwnership::Owned { relative: None };
|
||||
} else {
|
||||
self.directory.path.to_mut().push(&id.name.as_str());
|
||||
self.directory.path.to_mut().push(&id.as_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6075,7 +6075,7 @@ impl<'a> Parser<'a> {
|
|||
// `./<id>.rs` and `./<id>/mod.rs`.
|
||||
let relative_prefix_string;
|
||||
let relative_prefix = if let Some(ident) = relative {
|
||||
relative_prefix_string = format!("{}{}", ident.name.as_str(), path::MAIN_SEPARATOR);
|
||||
relative_prefix_string = format!("{}{}", ident.as_str(), path::MAIN_SEPARATOR);
|
||||
&relative_prefix_string
|
||||
} else {
|
||||
""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue