mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
clippy: fix warning for unwrap_or_default
This commit is contained in:
@@ -23,10 +23,7 @@ struct JsFile {
|
|||||||
|
|
||||||
impl ToString for JsFile {
|
impl ToString for JsFile {
|
||||||
fn to_string(&self) -> String {
|
fn to_string(&self) -> String {
|
||||||
self.file
|
self.file.as_ref().map(File::name).unwrap_or_default()
|
||||||
.as_ref()
|
|
||||||
.map(File::name)
|
|
||||||
.unwrap_or_else(String::new)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user