Skip to content

Commit

Permalink
to_sorted_vec -> into_sorted_vec
Browse files Browse the repository at this point in the history
  • Loading branch information
hesampakdaman committed May 19, 2024
1 parent 80e3d8a commit 7c21e33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn reduce(rx: Receiver<weather::Report>) -> Vec<weather::Station> {
while let Ok(stats) = rx.recv() {
merge_records(&mut hmap, stats);
}
to_sorted_vec(hmap)
into_sorted_vec(hmap)
}

fn merge_records(dst: &mut weather::Report, src: weather::Report) {
Expand All @@ -17,7 +17,7 @@ fn merge_records(dst: &mut weather::Report, src: weather::Report) {
}
}

fn to_sorted_vec(hmap: weather::Report) -> Vec<weather::Station> {
fn into_sorted_vec(hmap: weather::Report) -> Vec<weather::Station> {
let mut v = hmap.into_vec();
v.sort_unstable();
v
Expand Down

0 comments on commit 7c21e33

Please sign in to comment.