Skip to content

Commit 21523a2

Browse files
committed
Reworked according to Frank's comments
1 parent 2a5aa2e commit 21523a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use super::{Variable, Relation};
55
pub fn map_into<T1: Ord, T2: Ord>(
66
input: &Variable<T1>,
77
output: &Variable<T2>,
8-
mut logic: impl FnMut(&T1)->T2) {
8+
logic: impl FnMut(&T1)->T2) {
99

1010
let results: Vec<T2> = input.recent
1111
.borrow()
12-
.into_iter()
13-
.map(|tuple| logic(tuple))
12+
.iter()
13+
.map(logic)
1414
.collect();
1515

1616
output.insert(Relation::from_vec(results));

0 commit comments

Comments
 (0)