update to edition 2021 & fix clippy lints
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
name = "rosu-pp"
|
name = "rosu-pp"
|
||||||
version = "0.9.2"
|
version = "0.9.2"
|
||||||
authors = ["MaxOhn <ohn.m@hotmail.de>"]
|
authors = ["MaxOhn <ohn.m@hotmail.de>"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/MaxOhn/rosu-pp"
|
repository = "https://github.com/MaxOhn/rosu-pp"
|
||||||
|
|||||||
+2
-6
@@ -555,9 +555,7 @@ mod test {
|
|||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
(target_acc - acc).abs() < 1.0,
|
(target_acc - acc).abs() < 1.0,
|
||||||
"Expected: {} | Actual: {}",
|
"Expected: {target_acc} | Actual: {acc}",
|
||||||
target_acc,
|
|
||||||
acc
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -596,9 +594,7 @@ mod test {
|
|||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
(target_acc - acc).abs() < 1.0,
|
(target_acc - acc).abs() < 1.0,
|
||||||
"Expected: {} | Actual: {}",
|
"Expected: {target_acc} | Actual: {acc}",
|
||||||
target_acc,
|
|
||||||
acc
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ impl fmt::Display for ParseError {
|
|||||||
Self::InvalidCurvePoints => f.write_str("invalid curve point"),
|
Self::InvalidCurvePoints => f.write_str("invalid curve point"),
|
||||||
Self::InvalidDecimalNumber => f.write_str("invalid float number"),
|
Self::InvalidDecimalNumber => f.write_str("invalid float number"),
|
||||||
Self::InvalidMode => f.write_str("invalid mode"),
|
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"),
|
Self::UnknownHitObjectKind => f.write_str("unsupported hitobject kind"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,11 +143,13 @@ impl StrainDecaySkill for Rhythm {
|
|||||||
const STRAIN_DECAY_BASE: f64 = 0.0;
|
const STRAIN_DECAY_BASE: f64 = 0.0;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::misnamed_getters)]
|
||||||
fn curr_strain(&self) -> f64 {
|
fn curr_strain(&self) -> f64 {
|
||||||
self.curr_decay_strain
|
self.curr_decay_strain
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[allow(clippy::misnamed_getters)]
|
||||||
fn curr_strain_mut(&mut self) -> &mut f64 {
|
fn curr_strain_mut(&mut self) -> &mut f64 {
|
||||||
&mut self.curr_decay_strain
|
&mut self.curr_decay_strain
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,10 +55,7 @@ mod tests {
|
|||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
(rounded - expected).abs() <= f32::EPSILON,
|
(rounded - expected).abs() <= f32::EPSILON,
|
||||||
"expected {} for {}; got {}",
|
"expected {expected} for {value}; got {rounded}"
|
||||||
expected,
|
|
||||||
value,
|
|
||||||
rounded,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user