Merge pull request #755 from ebfe/fix-warnings

fmt: fix warnings
This commit is contained in:
Heather 2015-12-21 23:43:10 +04:00
commit 8ed14fb9d5
2 changed files with 2 additions and 2 deletions

View file

@ -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.

View file

@ -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
};