Skip to content

Commit

Permalink
FIXUP: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Reiher <[email protected]>
  • Loading branch information
senier and treiher authored Dec 2, 2024
1 parent 8d4c695 commit 8b86b87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions frontend/src/ui/page/muscles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ pub fn view(model: &Model, data_model: &data::Model) -> Node<Msg> {
let total_7day_set_volume = common::centered_moving_total(
&data_model
.training_sessions
.iter()
.filter_map(|(_, s)| {
.values()
.filter_map(|s| {
s.stimulus_per_muscle(&data_model.exercises)
.get(&domain::Muscle::id(*m))
.map(|stimulus| (s.date, *stimulus as f32 / 100.))
Expand All @@ -98,7 +98,7 @@ pub fn view(model: &Model, data_model: &data::Model) -> Node<Msg> {
&[common::PlotData {
values: total_7day_set_volume,
plots: common::plot_line(common::COLOR_SET_VOLUME),
params: common::PlotParams::default(),
params: common::PlotParams::primary_range(0., 10.),
}],
model.interval.first,
model.interval.last,
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/ui/page/training.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ pub fn view(model: &Model, data_model: &data::Model) -> Node<Msg> {
let average_7day_rpe = common::centered_moving_average(
&data_model
.training_sessions
.iter()
.filter_map(|(_, s)| s.avg_rpe().map(|v| (s.date, v)))
.values()
.filter_map(|s| s.avg_rpe().map(|v| (s.date, v)))
.collect::<Vec<_>>(),
&model.interval,
3,
Expand Down Expand Up @@ -562,7 +562,7 @@ pub fn view_charts<Ms>(
common::plot_chart(
&[common::PlotData {
values: total_7day_set_volume,
plots: [common::PlotType::Line(common::COLOR_SET_VOLUME, 2)].to_vec(),
plots: common::plot_line(common::COLOR_SET_VOLUME)),
params: common::PlotParams::primary_range(0., 10.),
}],
interval.first,
Expand Down

0 comments on commit 8b86b87

Please sign in to comment.