mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Apply clippy suggestions
This commit is contained in:
+1
-1
@@ -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
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user