mirror of
https://github.com/uutils/coreutils
synced 2024-11-16 17:58:06 +00:00
commit
8ed14fb9d5
2 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
#![crate_name = "uu_fmt"]
|
||||
#![feature(iter_cmp, str_char, unicode)]
|
||||
#![feature(str_char, unicode)]
|
||||
|
||||
/*
|
||||
* This file is part of `fmt` from the uutils coreutils package.
|
||||
|
|
|
@ -314,7 +314,7 @@ fn find_kp_breakpoints<'a, T: Iterator<Item=&'a WordInfo<'a>>>(iter: T, args: &B
|
|||
fn build_best_path<'a>(paths: &Vec<LineBreak<'a>>, active: &Vec<usize>) -> Vec<(&'a WordInfo<'a>, bool)> {
|
||||
let mut breakwords = vec!();
|
||||
// of the active paths, we select the one with the fewest demerits
|
||||
let mut best_idx = match active.iter().min_by(|&&a| paths[a].demerits) {
|
||||
let mut best_idx = match active.iter().min_by_key(|&&a| paths[a].demerits) {
|
||||
None => crash!(1, "Failed to find a k-p linebreak solution. This should never happen."),
|
||||
Some(&s) => s
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue