use as_derf() instead of .map(~as_str())

This commit is contained in:
dvvvvvv 2020-04-11 16:28:12 +09:00 committed by Abin Simon
parent 9315eec59c
commit 366f0c3084

View file

@ -111,7 +111,7 @@ impl Name {
}
pub fn extension(&self) -> Option<&str> {
self.extension.as_ref().map(|string| string.as_str())
self.extension.as_deref()
}
pub fn file_type(&self) -> FileType {