removed some unwraps

This commit is contained in:
MaxOhn
2021-11-06 23:00:03 +01:00
parent 21dcdeb942
commit c3974fa1ed
2 changed files with 22 additions and 23 deletions
+1 -5
View File
@@ -147,11 +147,7 @@ impl<'m> FruitsPP<'m> {
/// Be sure to set `misses` beforehand! Also, if available, set `attributes` beforehand.
pub fn accuracy(mut self, mut acc: f32) -> Self {
if self.attributes.is_none() {
self.attributes.replace(
stars(self.map, self.mods, self.passed_objects)
.attributes()
.unwrap(),
);
self.attributes = Some(stars(self.map, self.mods, self.passed_objects));
}
let attributes = self.attributes.as_ref().unwrap();