diff --git a/game/src/edit/mod.rs b/game/src/edit/mod.rs index da91dc70fe..4ff19824fb 100644 --- a/game/src/edit/mod.rs +++ b/game/src/edit/mod.rs @@ -737,7 +737,7 @@ pub fn speed_limit_choices(app: &App, preset: Option) -> Vec>(); if let Some(preset) = preset { - if !speeds.iter().all(|x| *x == preset) { + if !speeds.contains(&preset) { speeds.push(preset); speeds.sort(); } diff --git a/game/src/edit/roads.rs b/game/src/edit/roads.rs index 8275640d9d..8337fa1f5b 100644 --- a/game/src/edit/roads.rs +++ b/game/src/edit/roads.rs @@ -457,7 +457,7 @@ fn width_choices(app: &App, l: LaneID) -> Vec> { Distance::meters(3.0), ]; let current_width = app.primary.map.get_l(l).width; - if choices.iter().all(|x| *x != current_width) { + if !choices.contains(¤t_width) { choices.push(current_width); choices.sort(); }