fix: doc tests

This commit is contained in:
MaxOhn
2024-11-18 16:20:41 +01:00
parent 420e4c0697
commit dae2eb49b0
9 changed files with 20 additions and 36 deletions
+2 -4
View File
@@ -35,12 +35,10 @@ use super::{
/// use rosu_pp::{Beatmap, Difficulty};
/// use rosu_pp::osu::{Osu, OsuGradualDifficulty};
///
/// let converted = Beatmap::from_path("./resources/2785319.osu")
/// .unwrap()
/// .unchecked_into_converted::<Osu>();
/// let map = Beatmap::from_path("./resources/2785319.osu").unwrap();
///
/// let difficulty = Difficulty::new().mods(64); // DT
/// let mut iter = OsuGradualDifficulty::new(difficulty, &converted);
/// let mut iter = OsuGradualDifficulty::new(difficulty, &map).unwrap();
///
/// // the difficulty of the map after the first hit object
/// let attrs1 = iter.next();
+2 -4
View File
@@ -20,12 +20,10 @@ use super::{OsuPerformanceAttributes, OsuScoreState};
/// use rosu_pp::{Beatmap, Difficulty};
/// use rosu_pp::osu::{Osu, OsuGradualPerformance, OsuScoreState};
///
/// let converted = Beatmap::from_path("./resources/2785319.osu")
/// .unwrap()
/// .unchecked_into_converted::<Osu>();
/// let map = Beatmap::from_path("./resources/2785319.osu").unwrap();
///
/// let difficulty = Difficulty::new().mods(64); // DT
/// let mut gradual = OsuGradualPerformance::new(difficulty, &converted);
/// let mut gradual = OsuGradualPerformance::new(difficulty, &map).unwrap();
/// let mut state = OsuScoreState::new(); // empty state, everything is on 0.
///
/// // The first 10 hits are 300s and there are no sliders for additional combo