summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-02-29 02:16:04 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-02-29 02:16:04 +0100
commitf55b2c9b12144375bfbe31f7c6b27105e601edb0 (patch)
tree9119227d4d4dc115a01f06e26c457c5a7e08bf37 /src/libstd
parent0eb878d2aa6e3a1cb315f3f328681b26bb4bffdb (diff)
downloadrust-f55b2c9b12144375bfbe31f7c6b27105e601edb0.tar.gz
rust-f55b2c9b12144375bfbe31f7c6b27105e601edb0.zip
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,
         })
     }