made clippy happy

This commit is contained in:
MaxOhn
2024-06-28 21:36:59 +02:00
parent bf2c960e66
commit ad000794fb
4 changed files with 5 additions and 8 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ pub struct BeatmapAttributes {
/// AR and OD hit windows
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct HitWindows {
/// Hit window for approach rate i.e. TimePreempt in milliseconds.
/// Hit window for approach rate i.e. `TimePreempt` in milliseconds.
pub ar: f64,
/// Hit window for overall difficulty i.e. time to hit a 300 ("Great") in milliseconds.
pub od: f64,
+1 -1
View File
@@ -227,7 +227,7 @@ impl BeatmapState {
I: Iterator<Item = &'a str>,
F: FnOnce(&mut Self, &[&'a str]) -> O,
{
self.point_split.extend(point_split.map(|s| s as *const _));
self.point_split.extend(point_split.map(std::ptr::from_ref));
let ptr = self.point_split.as_ptr();
let len = self.point_split.len();
+1 -1
View File
@@ -107,7 +107,7 @@ impl<'a> OsuDifficultyObject<'a> {
return;
}
let scaling_factor = scaling_factor.factor_with_small_circle_bonus;
let scaling_factor = scaling_factor.factor;
let last_cursor_pos = Self::get_end_cursor_pos(last_object);
+2 -5
View File
@@ -9,10 +9,8 @@ use super::object::OsuDifficultyObject;
/// osu!lazer stores these in each hit object but since all objects share the
/// same scaling (w.r.t. difficulty & performance), we store them only once.
pub struct ScalingFactor {
/// `NORMALIZED_RADIUS / Radius`
pub factor: f32,
/// `NORMALIZED_RADIUS / Radius` and then adjusted if `Radius < 30`
pub factor_with_small_circle_bonus: f32,
pub factor: f32,
pub radius: f64,
pub scale: f32,
}
@@ -31,8 +29,7 @@ impl ScalingFactor {
};
Self {
factor,
factor_with_small_circle_bonus,
factor: factor_with_small_circle_bonus,
radius,
scale,
}