Skip to content

Commit

Permalink
Fix clippy lints introduced in 1.78
Browse files Browse the repository at this point in the history
  • Loading branch information
maddymakesgames committed May 28, 2024
1 parent 121f7de commit a409190
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/src/saves/ops/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Implements operations for all of the types found in the [celeste](crate::celeste) module
use std::{
collections::HashSet,
fmt::Write,
fmt::{Display, Write},
io::BufRead,
ops::{Deref, DerefMut},
};
Expand Down Expand Up @@ -232,7 +232,8 @@ impl SaveData {
}

if self.last_area_safe.is_none() {
self.last_area_safe = mod_save_data.last_area_safe.clone();
self.last_area_safe
.clone_from(&mod_save_data.last_area_safe);
}
}

Expand Down Expand Up @@ -554,13 +555,13 @@ impl ModSaveData {
}
}

impl ToString for DashMode {
fn to_string(&self) -> String {
match self {
impl Display for DashMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", match self {
DashMode::Normal => "Normal".to_owned(),
DashMode::Two => "Two".to_owned(),
DashMode::Infinite => "Infinite".to_owned(),
}
})
}
}

Expand Down

0 comments on commit a409190

Please sign in to comment.