mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-27 15:03:20 +03:00
Fix some clippy warnings
This commit is contained in:
parent
ca4ddeb7a5
commit
2fc9010b1e
@ -367,8 +367,8 @@ impl RouteResults {
|
||||
}
|
||||
|
||||
fn event(&mut self, ctx: &mut EventCtx, app: &App) -> Option<Transition> {
|
||||
match self.panel.event(ctx) {
|
||||
Outcome::Clicked(x) => match x.as_ref() {
|
||||
if let Outcome::Clicked(x) = self.panel.event(ctx) {
|
||||
match x.as_ref() {
|
||||
"high-stress roads" => {
|
||||
return Some(Transition::Push(PopupMsg::new_state(
|
||||
ctx,
|
||||
@ -385,8 +385,7 @@ impl RouteResults {
|
||||
"traffic signals" => {}
|
||||
"unprotected turns" => {}
|
||||
_ => unreachable!(),
|
||||
},
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
let current_dist_along = self
|
||||
|
@ -419,7 +419,7 @@ impl State<App> for MainState {
|
||||
app.model.map.save();
|
||||
}
|
||||
"reload" => {
|
||||
CameraState::save(&ctx.canvas, &app.model.map.name);
|
||||
CameraState::save(ctx.canvas, &app.model.map.name);
|
||||
return Transition::Push(crate::load::load_map(
|
||||
ctx,
|
||||
abstio::path_raw_map(&app.model.map.name),
|
||||
@ -428,7 +428,7 @@ impl State<App> for MainState {
|
||||
));
|
||||
}
|
||||
"open another RawMap" => {
|
||||
CameraState::save(&ctx.canvas, &app.model.map.name);
|
||||
CameraState::save(ctx.canvas, &app.model.map.name);
|
||||
return Transition::Push(crate::load::PickMap::new_state(ctx));
|
||||
}
|
||||
_ => unreachable!(),
|
||||
|
Loading…
Reference in New Issue
Block a user