changed {:?}s to {}s in format strings

This commit is contained in:
pepsalt 2022-09-02 15:39:09 +01:00 committed by LunarEclipse
parent f22a9d030d
commit 5294603431
2 changed files with 7 additions and 6 deletions

View File

@ -957,8 +957,8 @@ fn handle_time(
},
Some(n) => match n.parse::<f64>() {
Ok(n) => {
if n < 0.0{
return Err(format!("{:?} is invalid, cannot be negative.", n));
if n < 0.0 {
return Err(format!("{} is invalid, cannot be negative.", n));
}
// Seconds from next midnight
next_cycle(0.0) + n
@ -975,12 +975,15 @@ fn handle_time(
// Absolute time (i.e. from world epoch)
Some(n) => {
if (n as f64) < time_in_seconds {
return Err(format!("{:?} is before the current time, time cannot go backwards.", n))
return Err(format!(
"{} is before the current time, time cannot go backwards.",
n
));
}
n as f64
},
None => {
return Err(format!("{:?} is not a valid time.", n));
return Err(format!("{} is not a valid time.", n));
},
},
},

View File

@ -470,9 +470,7 @@ impl SettingsChange {
.renderer_mut()
.set_render_mode((*new_render_mode).clone())
.unwrap();
settings.graphics.render_mode = *new_render_mode;
},
Graphics::ChangeFullscreenMode(new_fullscreen_settings) => {
global_state