about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-22 11:04:25 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-11-02 09:01:02 +1100
commitb9cef6984b606705f42adf9587f4f1c3babf4d4d (patch)
tree361f6ab139c3f9fd37c3a8bf7263ac5937ddb82f /src/libsyntax/parse/parser
parent5bc7084f7e1be9da93bb014e05f19a80ff6fa188 (diff)
downloadrust-b9cef6984b606705f42adf9587f4f1c3babf4d4d.tar.gz
rust-b9cef6984b606705f42adf9587f4f1c3babf4d4d.zip
Simplify various `Symbol` use points.
Including removing a bunch of unnecessary `.as_str()` calls, and a bunch
of unnecessary sigils.
Diffstat (limited to 'src/libsyntax/parse/parser')
-rw-r--r--src/libsyntax/parse/parser/module.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/module.rs b/src/libsyntax/parse/parser/module.rs
index a0e4d2bbb7a..e80b1a7f607 100644
--- a/src/libsyntax/parse/parser/module.rs
+++ b/src/libsyntax/parse/parser/module.rs
@@ -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 {
             ""