summaryrefslogtreecommitdiffstats
path: root/src/tree_build/builder.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2024-08-04 08:10:44 +0200
committerCanop <cano.petrole@gmail.com>2024-08-04 08:10:44 +0200
commit7b2663b1c7cb70ca32def99a00b5fd5618840698 (patch)
tree92922f638a4ddbbe37dc08e3b7b455669135b9de /src/tree_build/builder.rs
parentb197512f8a97009971909152d35677551fe8cba9 (diff)
version 1.41.0v1.41.0
Diffstat (limited to 'src/tree_build/builder.rs')
-rw-r--r--src/tree_build/builder.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tree_build/builder.rs b/src/tree_build/builder.rs
index 65fe9a4..c52c117 100644
--- a/src/tree_build/builder.rs
+++ b/src/tree_build/builder.rs
@@ -424,7 +424,7 @@ impl<'c> TreeBuilder<'c> {
out_blines: &[BId],
) {
let mut count = 1;
- for id in out_blines[1..].iter() {
+ for id in &out_blines[1..] {
if self.blines[*id].has_match {
//debug!("bline before trimming: {:?}", &self.blines[*idx].path);
count += 1;
@@ -434,7 +434,7 @@ impl<'c> TreeBuilder<'c> {
}
}
let mut remove_queue: BinaryHeap<SortableBId> = BinaryHeap::new();
- for id in out_blines[1..].iter() {
+ for id in &out_blines[1..] {
let bline = &self.blines[*id];
if bline.has_match
&& bline.nb_kept_children == 0
@@ -533,7 +533,7 @@ impl<'c> TreeBuilder<'c> {
out_blines: &[BId],
) -> Tree {
let mut lines: Vec<TreeLine> = Vec::new();
- for id in out_blines.iter() {
+ for id in out_blines {
if self.blines[*id].has_match {
// we need to count the children, so we load them
if self.blines[*id].can_enter() && self.blines[*id].children.is_none() {
@@ -566,7 +566,7 @@ impl<'c> TreeBuilder<'c> {
tree.git_status = ComputationResult::NotComputed;
// it would make no sense to keep only files having a git status and
// not display that type
- for line in tree.lines.iter_mut() {
+ for line in &mut tree.lines {
line.git_status = computer.line_status(&line.path);
}
}