mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix clippy
This commit is contained in:
parent
6d3ea3172c
commit
db85d2a146
@ -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();
|
||||
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user