made bunch of functions const

This commit is contained in:
MaxOhn
2024-02-29 23:31:07 +01:00
parent 270d3d0008
commit 852f6cfa45
21 changed files with 233 additions and 140 deletions
+4 -4
View File
@@ -71,12 +71,12 @@ impl Beatmap {
}
/// Create a difficulty calculator for this [`Beatmap`].
pub fn difficulty(&self) -> Difficulty<'_> {
pub const fn difficulty(&self) -> Difficulty<'_> {
Difficulty::new(self)
}
/// Create a performance calculator for this [`Beatmap`].
pub fn performance(&self) -> Performance<'_> {
pub const fn performance(&self) -> Performance<'_> {
Performance::new(self)
}
@@ -150,8 +150,8 @@ impl Beatmap {
/// Returns a [`BeatmapAttributesBuilder`] to calculate modified beatmap
/// attributes.
pub fn attributes(&self) -> BeatmapAttributesBuilder {
self.into()
pub const fn attributes(&self) -> BeatmapAttributesBuilder {
BeatmapAttributesBuilder::new(self)
}
/// The beats per minute of the map.