diff --git a/crates/coremem/src/meas.rs b/crates/coremem/src/meas.rs index 12ff4ff..ba34e19 100644 --- a/crates/coremem/src/meas.rs +++ b/crates/coremem/src/meas.rs @@ -14,7 +14,7 @@ pub fn as_dyn_measurements>(meas: &[M]) -> Vec<&dyn /// combine several measurements -pub fn eval_multiple_kv(state: &S, meas: &[&dyn AbstractMeasurement]) -> Vec { +pub fn eval_multiple(state: &S, meas: &[&dyn AbstractMeasurement]) -> Vec { meas.into_iter().flat_map(|m| m.key_value(state).into_iter()).collect() } diff --git a/crates/coremem/src/render.rs b/crates/coremem/src/render.rs index 1cb689e..53df5d3 100644 --- a/crates/coremem/src/render.rs +++ b/crates/coremem/src/render.rs @@ -294,7 +294,7 @@ impl<'a, S: AbstractSim> RenderSteps<'a, S> { self.im = im; } fn render_measurements(&mut self) { - for (meas_no, m) in meas::eval_multiple_kv(self.sim, &self.meas).into_iter().enumerate() { + for (meas_no, m) in meas::eval_multiple(self.sim, &self.meas).into_iter().enumerate() { let meas_string = m.str_value(); for (i, c) in meas_string.chars().enumerate() { let glyph = BASIC_FONTS.get(c) @@ -425,7 +425,7 @@ impl Renderer for ColorTermRenderer { measurements: &[&dyn AbstractMeasurement], config: RenderConfig, ) { - let measurements = meas::eval_multiple_kv(state, measurements); + let measurements = meas::eval_multiple(state, measurements); let (max_w, mut max_h) = crossterm::terminal::size().unwrap(); max_h = max_h.saturating_sub(2 + measurements.len() as u16); let im = RenderSteps::render_configured(state, &[], z, (max_w as _, max_h as _), config); @@ -657,9 +657,9 @@ impl Renderer for SerializerRenderer { } fn render(&self, state: &S, measurements: &[&dyn AbstractMeasurement], _config: RenderConfig) { if self.prefer_generic { - self.serialize(&state.to_generic(), meas::eval_multiple_kv(state, measurements)); + self.serialize(&state.to_generic(), meas::eval_multiple(state, measurements)); } else { - self.serialize(state, meas::eval_multiple_kv(state, measurements)); + self.serialize(state, meas::eval_multiple(state, measurements)); } } } @@ -699,7 +699,7 @@ impl Renderer for CsvRenderer { default_render_z_slice(self, state, z, measurements, config) } fn render(&self, state: &S, measurements: &[&dyn AbstractMeasurement], _config: RenderConfig) { - let row = meas::eval_multiple_kv(state, measurements); + let row = meas::eval_multiple(state, measurements); let step = state.step_no(); let mut lock = self.state.lock().unwrap(); let mut writer = match lock.take().unwrap() {