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

View file

@ -481,8 +481,7 @@ pub fn update_menu(
id2pos.0.get(cmd::ID_PLAYER), id2pos.0.get(cmd::ID_PLAYER),
id2pos.0.get(cmd::ID_JUPITER), 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) = let (clock_max, clock_current) =
nature::pos_to_orbit_time(*player_pos, *jupiter_pos, nature::JUPITER_MASS); nature::pos_to_orbit_time(*player_pos, *jupiter_pos, nature::JUPITER_MASS);
format!( 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 { 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
);
} }