mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
+1
-1
@@ -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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user