slight clarification in documentation

This commit is contained in:
MaxOhn
2021-01-19 21:06:15 +01:00
parent f12a190d4f
commit 19782838e4
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ let map = match Beatmap::parse(file) {
// The different modes make things annoying because their // The different modes make things annoying because their
// pp calculations require different parameters. // pp calculations require different parameters.
// For now, you will have to match on the mode yourself // You will have to match on the mode yourself
// to be able to set all options for pp calculation. // to be able to set all options for pp calculation.
match map.mode { match map.mode {
GameMode::STD => { GameMode::STD => {
@@ -31,7 +31,7 @@ match map.mode {
.combo(1234) .combo(1234)
.misses(2) .misses(2)
.accuracy(99.2) .accuracy(99.2)
// `no_leniency` is the suggested default // `no_leniency::stars` is the suggested default
.calculate(rosu_pp::osu::no_leniency::stars); .calculate(rosu_pp::osu::no_leniency::stars);
println!("PP: {}", result.pp()); println!("PP: {}", result.pp());
+2 -2
View File
@@ -20,7 +20,7 @@
//! //!
//! // The different modes make things annoying because their //! // The different modes make things annoying because their
//! // pp calculations require different parameters. //! // pp calculations require different parameters.
//! // For now, you will have to match on the mode yourself //! // You will have to match on the mode yourself
//! // to be able to set all options for pp calculation. //! // to be able to set all options for pp calculation.
//! match map.mode { //! match map.mode {
//! GameMode::STD => { //! GameMode::STD => {
@@ -29,7 +29,7 @@
//! .combo(1234) //! .combo(1234)
//! .misses(2) //! .misses(2)
//! .accuracy(99.2) //! .accuracy(99.2)
//! // `no_leniency` is the suggested default //! // `no_leniency::stars` is the suggested default
//! .calculate(rosu_pp::osu::no_leniency::stars); //! .calculate(rosu_pp::osu::no_leniency::stars);
//! //!
//! println!("PP: {}", result.pp()); //! println!("PP: {}", result.pp());
+2 -2
View File
@@ -168,12 +168,12 @@ impl<'m> OsuPP<'m> {
self self
} }
/// Returns an object which contains the pp and [`DifficultyAttributes`](crate::fruits::DifficultyAttributes) /// Returns an object which contains the pp and [`DifficultyAttributes`](crate::osu::DifficultyAttributes)
/// containing stars and other attributes. /// containing stars and other attributes.
/// ///
/// `stars_func` will be used to calculate the difficulty attributes if not already given. /// `stars_func` will be used to calculate the difficulty attributes if not already given.
/// Only called if `attributes` was not set. /// Only called if `attributes` was not set.
/// The default is suggested to be [`stars`](crate::osu::no_leniency::stars). /// The default is suggested to be [`no_leniency::stars`](crate::osu::no_leniency::stars).
pub fn calculate( pub fn calculate(
mut self, mut self,
stars_func: impl FnOnce(&Beatmap, u32, Option<usize>) -> StarResult, stars_func: impl FnOnce(&Beatmap, u32, Option<usize>) -> StarResult,