summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-29 18:53:59 +0100
committerGitHub <noreply@github.com>2020-02-29 18:53:59 +0100
commitb22631bfafe0a6dbe038b180bf838847b39385ea (patch)
tree4f1c7edd80e46e39e7ba22d43473d4834aa743aa /src/libstd
parente9bca510fe17354f876aa289bb39d347d7c69c69 (diff)
parentf55b2c9b12144375bfbe31f7c6b27105e601edb0 (diff)
downloadrust-b22631bfafe0a6dbe038b180bf838847b39385ea.tar.gz
rust-b22631bfafe0a6dbe038b180bf838847b39385ea.zip
Rollup merge of #69571 - matthiaskrgr:useless_asref, r=Centril
remove unneeded .as_ref() calls.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index a703cb748e0..b8361d3e825 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -2011,7 +2011,7 @@ impl Path {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn file_name(&self) -> Option<&OsStr> {
         self.components().next_back().and_then(|p| match p {
-            Component::Normal(p) => Some(p.as_ref()),
+            Component::Normal(p) => Some(p),
             _ => None,
         })
     }