use proper default capacities

This commit is contained in:
MaxOhn
2024-02-13 15:11:30 +01:00
parent 2327287a32
commit b88e49889b
8 changed files with 43 additions and 19 deletions
+13 -2
View File
@@ -23,11 +23,22 @@ pub trait ISkill {
type DifficultyObjects<'a>: ?Sized;
}
#[derive(Clone, Default)]
#[derive(Clone)]
pub struct StrainSkill {
pub curr_section_peak: f64,
pub curr_section_end: f64,
pub strain_peaks: Vec<f64>, // TODO: default capacity
pub strain_peaks: Vec<f64>,
}
impl Default for StrainSkill {
fn default() -> Self {
Self {
curr_section_peak: 0.0,
curr_section_end: 0.0,
// mean=386.81 | median=279
strain_peaks: Vec::with_capacity(256),
}
}
}
impl StrainSkill {