diff options
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)      }  } | 
