update to edition 2021 & fix clippy lints

This commit is contained in:
MaxOhn
2023-01-27 07:58:07 +01:00
parent e6957f935a
commit 28bcf107f1
5 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
name = "rosu-pp"
version = "0.9.2"
authors = ["MaxOhn <ohn.m@hotmail.de>"]
edition = "2018"
edition = "2021"
license = "MIT"
readme = "README.md"
repository = "https://github.com/MaxOhn/rosu-pp"
+2 -6
View File
@@ -555,9 +555,7 @@ mod test {
assert!(
(target_acc - acc).abs() < 1.0,
"Expected: {} | Actual: {}",
target_acc,
acc
"Expected: {target_acc} | Actual: {acc}",
);
}
@@ -596,9 +594,7 @@ mod test {
assert!(
(target_acc - acc).abs() < 1.0,
"Expected: {} | Actual: {}",
target_acc,
acc
"Expected: {target_acc} | Actual: {acc}",
);
}
+1 -1
View File
@@ -36,7 +36,7 @@ impl fmt::Display for ParseError {
Self::InvalidCurvePoints => f.write_str("invalid curve point"),
Self::InvalidDecimalNumber => f.write_str("invalid float number"),
Self::InvalidMode => f.write_str("invalid mode"),
Self::MissingField(field) => write!(f, "missing field `{}`", field),
Self::MissingField(field) => write!(f, "missing field `{field}`"),
Self::UnknownHitObjectKind => f.write_str("unsupported hitobject kind"),
}
}
+2
View File
@@ -143,11 +143,13 @@ impl StrainDecaySkill for Rhythm {
const STRAIN_DECAY_BASE: f64 = 0.0;
#[inline]
#[allow(clippy::misnamed_getters)]
fn curr_strain(&self) -> f64 {
self.curr_decay_strain
}
#[inline]
#[allow(clippy::misnamed_getters)]
fn curr_strain_mut(&mut self) -> &mut f64 {
&mut self.curr_decay_strain
}
+1 -4
View File
@@ -55,10 +55,7 @@ mod tests {
assert!(
(rounded - expected).abs() <= f32::EPSILON,
"expected {} for {}; got {}",
expected,
value,
rounded,
"expected {expected} for {value}; got {rounded}"
);
}
}