fixed build on some feature combinations
This commit is contained in:
+18
-10
@@ -1,11 +1,19 @@
|
||||
use crate::{
|
||||
fruits::{
|
||||
FruitsGradualDifficultyAttributes, FruitsGradualPerformanceAttributes, FruitsScoreState,
|
||||
},
|
||||
mania::{ManiaGradualDifficultyAttributes, ManiaGradualPerformanceAttributes},
|
||||
osu::{OsuGradualDifficultyAttributes, OsuGradualPerformanceAttributes, OsuScoreState},
|
||||
taiko::{TaikoGradualDifficultyAttributes, TaikoGradualPerformanceAttributes, TaikoScoreState},
|
||||
Beatmap, DifficultyAttributes, GameMode, Mods, PerformanceAttributes,
|
||||
use crate::{Beatmap, DifficultyAttributes, GameMode, Mods, PerformanceAttributes};
|
||||
|
||||
#[cfg(feature = "fruits")]
|
||||
use crate::fruits::{
|
||||
FruitsGradualDifficultyAttributes, FruitsGradualPerformanceAttributes, FruitsScoreState,
|
||||
};
|
||||
|
||||
#[cfg(feature = "mania")]
|
||||
use crate::mania::{ManiaGradualDifficultyAttributes, ManiaGradualPerformanceAttributes};
|
||||
|
||||
#[cfg(feature = "osu")]
|
||||
use crate::osu::{OsuGradualDifficultyAttributes, OsuGradualPerformanceAttributes, OsuScoreState};
|
||||
|
||||
#[cfg(feature = "taiko")]
|
||||
use crate::taiko::{
|
||||
TaikoGradualDifficultyAttributes, TaikoGradualPerformanceAttributes, TaikoScoreState,
|
||||
};
|
||||
|
||||
/// Gradually calculate the difficulty attributes on maps of any mode.
|
||||
@@ -19,7 +27,7 @@ use crate::{
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// use rosu_pp::{Beatmap, GradualDifficultyAttributes};
|
||||
///
|
||||
/// # /*
|
||||
@@ -228,7 +236,7 @@ impl From<ScoreState> for TaikoScoreState {
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// use rosu_pp::{Beatmap, GradualPerformanceAttributes, ScoreState};
|
||||
///
|
||||
/// # /*
|
||||
|
||||
+3
-3
@@ -496,11 +496,11 @@ impl PerformanceAttributes {
|
||||
pub fn max_combo(&self) -> usize {
|
||||
match self {
|
||||
#[cfg(feature = "fruits")]
|
||||
Self::Fruits(f) => f.attributes.max_combo,
|
||||
Self::Fruits(f) => f.difficulty.max_combo,
|
||||
#[cfg(feature = "osu")]
|
||||
Self::Osu(o) => o.attributes.max_combo,
|
||||
Self::Osu(o) => o.difficulty.max_combo,
|
||||
#[cfg(feature = "taiko")]
|
||||
Self::Taiko(t) => t.attributes.max_combo,
|
||||
Self::Taiko(t) => t.difficulty.max_combo,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ use crate::taiko::{TaikoDifficultyAttributes, TaikoPP};
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// ```no_run
|
||||
/// use rosu_pp::{AnyPP, Beatmap};
|
||||
///
|
||||
/// # /*
|
||||
|
||||
@@ -166,6 +166,7 @@ impl<'map> TaikoGradualPerformanceAttributes<'map> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[allow(unused_imports)]
|
||||
use super::*;
|
||||
|
||||
#[cfg(not(any(feature = "async_tokio", feature = "async_std")))]
|
||||
|
||||
Reference in New Issue
Block a user