Simplify various Symbol use points.

Including removing a bunch of unnecessary `.as_str()` calls, and a bunch
of unnecessary sigils.
This commit is contained in:
Nicholas Nethercote 2019-10-22 11:04:25 +11:00
parent 5bc7084f7e
commit b9cef6984b
31 changed files with 49 additions and 50 deletions

View file

@ -229,7 +229,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.as_str(), path::MAIN_SEPARATOR);
relative_prefix_string = format!("{}{}", ident, path::MAIN_SEPARATOR);
&relative_prefix_string
} else {
""