From bcaa859ca74639095f775998411d6856f294f544 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Mon, 21 Dec 2015 20:23:55 +0100 Subject: [PATCH] fmt: fix warnings --- src/fmt/fmt.rs | 2 +- src/fmt/linebreak.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fmt/fmt.rs b/src/fmt/fmt.rs index 9e8c9dbd4..550f3dcda 100644 --- a/src/fmt/fmt.rs +++ b/src/fmt/fmt.rs @@ -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. diff --git a/src/fmt/linebreak.rs b/src/fmt/linebreak.rs index c4394baf9..a043444fc 100644 --- a/src/fmt/linebreak.rs +++ b/src/fmt/linebreak.rs @@ -314,7 +314,7 @@ fn find_kp_breakpoints<'a, T: Iterator>>(iter: T, args: &B fn build_best_path<'a>(paths: &Vec>, active: &Vec) -> 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 };