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