fix clippy

This commit is contained in:
Christof Petig 2022-06-01 23:23:16 +02:00
parent 6d3ea3172c
commit db85d2a146
2 changed files with 2 additions and 9 deletions

View File

@ -304,7 +304,7 @@ mod tests {
) {
for (id, site) in sites.iter() {
let name = names.as_ref().map_or(site.name().into(), |map| {
map.get(&id).cloned().unwrap_or(site.name().into())
map.get(&id).cloned().unwrap_or_else(|| site.name().into())
});
println!("Site id {:?} name {}", id.id(), name);
site.economy.print_details();

View File

@ -1418,6 +1418,7 @@ fn direct_use_goods() -> &'static [GoodIndex] {
&*DIRECT_USE
}
#[derive(Default)]
pub struct GraphInfo {
dummy: Economy,
}
@ -1435,11 +1436,3 @@ impl GraphInfo {
pub fn can_store(&self, g: &GoodIndex) -> bool { direct_use_goods().contains(g) }
}
impl Default for GraphInfo {
fn default() -> Self {
Self {
dummy: Economy::default(),
}
}
}