added From impl

This commit is contained in:
MaxOhn
2024-02-29 22:49:29 +01:00
parent 74075c7dc3
commit 2c44ef3a35
+6
View File
@@ -108,6 +108,12 @@ impl PerformanceAttributes {
}
}
impl From<PerformanceAttributes> for DifficultyAttributes {
fn from(attrs: PerformanceAttributes) -> Self {
attrs.difficulty_attributes()
}
}
/// Abstract type to provide flexibility when passing difficulty attributes to a performance calculation.
pub trait AttributeProvider {
/// Provide the actual difficulty attributes.