From e1d41b84f3eaf09384d108ed12c42a6c3edad2d0 Mon Sep 17 00:00:00 2001 From: shutefan Date: Fri, 6 Oct 2017 00:49:43 +0200 Subject: [PATCH] travis: fix compiler warnings for 1.22 --- src/comm/comm.rs | 4 ++-- src/printf/tokenize/unescaped_text.rs | 2 +- src/unexpand/unexpand.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/comm/comm.rs b/src/comm/comm.rs index 749daa501..98f5b742b 100644 --- a/src/comm/comm.rs +++ b/src/comm/comm.rs @@ -65,9 +65,9 @@ fn comm(a: &mut LineReader, b: &mut LineReader, opts: &getopts::Matches) { let delim : Vec = (0 .. 4).map(|col| mkdelim(col, opts)).collect(); - let mut ra = &mut String::new(); + let ra = &mut String::new(); let mut na = a.read_line(ra); - let mut rb = &mut String::new(); + let rb = &mut String::new(); let mut nb = b.read_line(rb); while na.is_ok() || nb.is_ok() { diff --git a/src/printf/tokenize/unescaped_text.rs b/src/printf/tokenize/unescaped_text.rs index 45f006fdf..50eecc8ec 100644 --- a/src/printf/tokenize/unescaped_text.rs +++ b/src/printf/tokenize/unescaped_text.rs @@ -179,7 +179,7 @@ impl UnescapedText { let mut new_text = UnescapedText::new(); let mut tmp_str = String::new(); { - let mut new_vec: &mut Vec = &mut (new_text.0); + let new_vec: &mut Vec = &mut (new_text.0); while let Some(ch) = it.next() { if !addchar { addchar = true; diff --git a/src/unexpand/unexpand.rs b/src/unexpand/unexpand.rs index 556f97119..dbbe417bd 100644 --- a/src/unexpand/unexpand.rs +++ b/src/unexpand/unexpand.rs @@ -137,7 +137,7 @@ fn next_tabstop(tabstops: &[usize], col: usize) -> Option { } } -fn write_tabs(mut output: &mut BufWriter, tabstops: &[usize], +fn write_tabs(output: &mut BufWriter, tabstops: &[usize], mut scol: usize, col: usize, prevtab: bool, init: bool, amode: bool) { // This conditional establishes the following: // We never turn a single space before a non-blank into