remove unneeded .as_ref() calls.
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user