update to edition 2021 & fix clippy lints
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -55,10 +55,7 @@ mod tests {
|
||||
|
||||
assert!(
|
||||
(rounded - expected).abs() <= f32::EPSILON,
|
||||
"expected {} for {}; got {}",
|
||||
expected,
|
||||
value,
|
||||
rounded,
|
||||
"expected {expected} for {value}; got {rounded}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user