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:
@@ -308,7 +308,7 @@ mod tests {
|
||||
|
||||
State {
|
||||
game_type: GameType::Tes4,
|
||||
data_path: data_path,
|
||||
data_path,
|
||||
loot_path: loot_path.into(),
|
||||
active_plugins: active_plugins
|
||||
.into_iter()
|
||||
|
||||
+3
-3
@@ -41,14 +41,14 @@ pub enum GameType {
|
||||
}
|
||||
|
||||
impl GameType {
|
||||
fn supports_light_plugins(&self) -> bool {
|
||||
fn supports_light_plugins(self) -> bool {
|
||||
match self {
|
||||
GameType::Tes5se | GameType::Tes5vr | GameType::Fo4 | GameType::Fo4vr => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
fn is_plugin_filename(&self, path: &Path) -> bool {
|
||||
fn is_plugin_filename(self, path: &Path) -> bool {
|
||||
match path.extension().and_then(OsStr::to_str) {
|
||||
Some("esp") | Some("esm") => true,
|
||||
Some("esl") if self.supports_light_plugins() => true,
|
||||
@@ -277,7 +277,7 @@ mod tests {
|
||||
|
||||
State {
|
||||
game_type: GameType::Tes4,
|
||||
data_path: data_path,
|
||||
data_path,
|
||||
loot_path: PathBuf::new(),
|
||||
active_plugins: HashSet::new(),
|
||||
crc_cache: RwLock::default(),
|
||||
|
||||
Reference in New Issue
Block a user