diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-03-27 15:24:14 -0500 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-03-27 15:56:23 -0700 |
| commit | 666bb1959ec072665d2e8765b01dd96127589177 (patch) | |
| tree | d8a4596b9bcc6328ab30c9c0406a5b1c3bc8fe8a /src/libsyntax/parse | |
| parent | 76cc08b45a11d0c3d8839ba458fb5685b97cd5cb (diff) | |
| parent | eb447f4ef436f0c6211a13de1e6150a09228a9c6 (diff) | |
Rollup merge of #40606 - oli-obk:interned_str_usability, r=jseyfried
Improve `InternedString` usability
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 649e9059934..43a9d8c5f78 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -5151,15 +5151,15 @@ impl<'a> Parser<'a> { fn push_directory(&mut self, id: Ident, attrs: &[Attribute]) { if let Some(path) = attr::first_attr_value_str_by_name(attrs, "path") { - self.directory.path.push(&*path.as_str()); + self.directory.path.push(&path.as_str()); self.directory.ownership = DirectoryOwnership::Owned; } else { - self.directory.path.push(&*id.name.as_str()); + self.directory.path.push(&id.name.as_str()); } } pub fn submod_path_from_attr(attrs: &[ast::Attribute], dir_path: &Path) -> Option<PathBuf> { - attr::first_attr_value_str_by_name(attrs, "path").map(|d| dir_path.join(&*d.as_str())) + attr::first_attr_value_str_by_name(attrs, "path").map(|d| dir_path.join(&d.as_str())) } /// Returns either a path to a module, or . |
