refactor: create performance calculators through traits (#33)

* create perf calc through IntoPerformance traits

* added tests

* adjusted documentation

* fix doctest

* simplify From impls
This commit is contained in:
Badewanne3
2024-04-01 19:14:38 +02:00
committed by GitHub
parent 616f2b5758
commit 9acf85e934
24 changed files with 772 additions and 446 deletions
+2 -2
View File
@@ -88,8 +88,8 @@ impl Beatmap {
}
/// Create a performance calculator for this [`Beatmap`].
pub const fn performance(&self) -> Performance<'_> {
Performance::from_map(self)
pub fn performance(&self) -> Performance<'_> {
Performance::new(self)
}
/// Create a gradual difficulty calculator for this [`Beatmap`].