diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-16 18:00:28 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-16 18:00:35 +0200 |
commit | 499f4994a6a8507dcca20ed820c851be9a2343c1 (patch) | |
tree | 9100c6c924e116e811d94d7188353f87819d02d3 /server/src/data | |
parent | 709fd5ddaaec290165e85b48b237cb82563b9e87 (diff) | |
download | hurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar hurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar.bz2 hurrycurry-499f4994a6a8507dcca20ed820c851be9a2343c1.tar.zst |
fix all clippy things
Diffstat (limited to 'server/src/data')
-rw-r--r-- | server/src/data/index.rs | 13 | ||||
-rw-r--r-- | server/src/data/mod.rs | 6 |
2 files changed, 7 insertions, 12 deletions
diff --git a/server/src/data/index.rs b/server/src/data/index.rs index 1c206d83..e056cfc0 100644 --- a/server/src/data/index.rs +++ b/server/src/data/index.rs @@ -11,14 +11,11 @@ impl GamedataIndex { self.recipe_passive_by_input.clear(); for (ri, r) in data.recipes() { - match r { - Recipe::Passive { input, .. } => { - self.recipe_passive_by_input - .entry(*input) - .or_default() - .push(ri); - } - _ => (), + if let Recipe::Passive { input, .. } = r { + self.recipe_passive_by_input + .entry(*input) + .or_default() + .push(ri); } } } diff --git a/server/src/data/mod.rs b/server/src/data/mod.rs index 246f695e..91b32a42 100644 --- a/server/src/data/mod.rs +++ b/server/src/data/mod.rs @@ -152,14 +152,12 @@ impl DataIndex { &self .read_recipes( map_in - .recipes - .as_ref() - .map(|a| a.as_str()) + .recipes.as_deref() .unwrap_or("default"), ) .await?, )?; - Ok(build_data(&self.maps, map.to_string(), map_in, recipes_in)?) + build_data(&self.maps, map.to_string(), map_in, recipes_in) } } |