Skip to content

Commit ab41505

Browse files
committed
Fix clippy lints
1 parent 6514b41 commit ab41505

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

rust/src/reactive/flat_fat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ where
142142
let leaf = self.leaf(idx);
143143
self.tree[leaf] = val;
144144
});
145-
(0..self.leaf(0)).into_iter().rev().for_each(|parent| {
145+
(0..self.leaf(0)).rev().for_each(|parent| {
146146
let left = self.left(parent);
147147
let right = self.right(parent);
148148
self.tree[parent] = self.tree[left].operate(&self.tree[right]);
@@ -164,7 +164,7 @@ where
164164
}
165165
node = parent;
166166
}
167-
return agg;
167+
agg
168168
}
169169

170170
fn suffix(&self, i: usize) -> Value {
@@ -177,6 +177,6 @@ where
177177
}
178178
node = parent;
179179
}
180-
return agg;
180+
agg
181181
}
182182
}

rust/src/reactive/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ where
3232
}
3333
}
3434
fn inverted(&self) -> bool {
35-
return self.front > self.back;
35+
self.front > self.back
3636
}
3737
fn resize(&mut self, capacity: usize) {
3838
let leaves = self.fat.leaves();

rust/src/two_stacks/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ where
6363
BinOp: Operator,
6464
{
6565
#[inline(always)]
66-
fn agg(stack: &Vec<Item<Value>>) -> Value {
66+
fn agg(stack: &[Item<Value>]) -> Value {
6767
if let Some(top) = stack.last() {
6868
top.agg.clone()
6969
} else {

0 commit comments

Comments
 (0)