Skip to content

Commit

Permalink
review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arp-1 committed Dec 14, 2023
1 parent 5680fb9 commit 9a0d435
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/uu/fmt/src/linebreak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ fn build_best_path<'a>(paths: &[LineBreak<'a>], active: &[usize]) -> Vec<(&'a Wo
active
.iter()
.min_by_key(|&&a| paths[a].demerits)
.iter()
.flat_map(|&&(mut best_idx)| {
.map(|&(mut best_idx)| {
let mut breakwords = vec![];
// now, chase the pointers back through the break list, recording
// the words at which we should break
Expand All @@ -381,7 +380,7 @@ fn build_best_path<'a>(paths: &[LineBreak<'a>], active: &[usize]) -> Vec<(&'a Wo
}
}
})
.collect()
.unwrap_or_default()
}

// "infinite" badness is more like (1+BAD_INFTY)^2 because of how demerits are computed
Expand Down

0 comments on commit 9a0d435

Please sign in to comment.