Apply clippy suggestions

This commit is contained in:
Oliver Hamlet
2019-06-16 20:33:28 +01:00
parent 611e4490d2
commit 44d73e0611
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ impl State {
pub fn set_active_plugins<T: AsRef<str>>(&mut self, active_plugins: &[T]) {
self.active_plugins = active_plugins
.into_iter()
.iter()
.map(|s| s.as_ref().to_lowercase())
.collect();
}
+3 -3
View File
@@ -42,7 +42,7 @@ impl Version {
f.dwFileVersion.Build
)
})
.unwrap_or(String::new())
.unwrap_or_else(String::new)
})
}
@@ -50,7 +50,7 @@ impl Version {
Self::read_version(file_path, |v| {
v.query_value(&"ProductVersion")
.map(String::from_utf16_lossy)
.unwrap_or(String::new())
.unwrap_or_else(String::new)
})
}
@@ -99,7 +99,7 @@ fn get_pe_resources(bytes: &[u8]) -> Result<Resources, pelite::Error> {
PeFile::from_bytes(bytes)?.resources()
}
Err(e) => Err(e.into()),
Err(e) => Err(e),
}
}