remove unneeded .as_ref() calls.
This commit is contained in:
parent
0eb878d2aa
commit
f55b2c9b12
3 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue