cargo fmt

This commit is contained in:
yuni 2024-10-27 02:01:47 +01:00
parent eacd3f159a
commit 989b6cfb17
3 changed files with 8 additions and 9 deletions

View file

@ -150,9 +150,7 @@ impl Cycle {
Some(current_index - 1)
}
}
Cycle::Unchanged => {
Some(current_index)
}
Cycle::Unchanged => Some(current_index),
}
}
}
@ -288,9 +286,7 @@ pub fn handle_game_event(
pronoun: None,
talking_speed: 0.0,
};
ew_conv.send(chat::StartConversationEvent {
talker: talker,
});
ew_conv.send(chat::StartConversationEvent { talker: talker });
}
}
}

View file

@ -481,8 +481,7 @@ pub fn update_menu(
id2pos.0.get(cmd::ID_PLAYER),
id2pos.0.get(cmd::ID_JUPITER),
) {
let clock = if player_pos.y.abs() < 1e7 && player_pos.distance(*jupiter_pos) < 1e10
{
let clock = if player_pos.y.abs() < 1e7 && player_pos.distance(*jupiter_pos) < 1e10 {
let (clock_max, clock_current) =
nature::pos_to_orbit_time(*player_pos, *jupiter_pos, nature::JUPITER_MASS);
format!(

View file

@ -263,5 +263,9 @@ pub fn pos_to_orbit_time(pos: DVec3, orbited_pos: DVec3, orbited_mass: f64) -> (
}
pub fn format_seconds_to_hour_min(seconds: f64) -> String {
return format!("{:02.0}:{:02.0}", seconds / 3600.0, (seconds % 3600.0) / 60.0);
return format!(
"{:02.0}:{:02.0}",
seconds / 3600.0,
(seconds % 3600.0) / 60.0
);
}