Skip to content

Commit

Permalink
use into_iter() instead of iter() to move out of cols
Browse files Browse the repository at this point in the history
  • Loading branch information
matzemathics authored and mmarx committed Aug 23, 2023
1 parent c48eb1b commit 84bd739
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nemo-physical/src/tabular/table_types/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,21 +348,21 @@ impl Table for Trie {
let permutator = Permutator::sort_from_multiple_vec(&cols)
.expect("debug assert above ensures that cols have the same length");
let sorted_cols: Vec<VecT> =
cols.iter()
cols.into_iter()
.map(|col| match col {
VecT::U32(vec) => VecT::U32(permutator.permutate(vec).expect(
VecT::U32(vec) => VecT::U32(permutator.permutate(&vec).expect(
"length matches since permutator is constructed from these vectores",
)),
VecT::U64(vec) => VecT::U64(permutator.permutate(vec).expect(
VecT::U64(vec) => VecT::U64(permutator.permutate(&vec).expect(
"length matches since permutator is constructed from these vectores",
)),
VecT::I64(vec) => VecT::I64(permutator.permutate(vec).expect(
VecT::I64(vec) => VecT::I64(permutator.permutate(&vec).expect(
"length matches since permutator is constructed from these vectores",
)),
VecT::Float(vec) => VecT::Float(permutator.permutate(vec).expect(
VecT::Float(vec) => VecT::Float(permutator.permutate(&vec).expect(
"length matches since permutator is constructed from these vectores",
)),
VecT::Double(vec) => VecT::Double(permutator.permutate(vec).expect(
VecT::Double(vec) => VecT::Double(permutator.permutate(&vec).expect(
"length matches since permutator is constructed from these vectores",
)),
})
Expand Down

0 comments on commit 84bd739

Please sign in to comment.