diff --git a/src/cut/ranges.rs b/src/cut/ranges.rs index aae12cc4e..43f4c8373 100644 --- a/src/cut/ranges.rs +++ b/src/cut/ranges.rs @@ -68,7 +68,7 @@ impl Range { while j < ranges.len() && ranges[j].low <= ranges[i].high { let j_high = ranges.remove(j).unwrap().high; - ranges.get_mut(i).high = max(ranges[i].high, j_high); + ranges[i].high = max(ranges[i].high, j_high); } } diff --git a/src/fmt/linebreak.rs b/src/fmt/linebreak.rs index a7753290f..993cb9db4 100644 --- a/src/fmt/linebreak.rs +++ b/src/fmt/linebreak.rs @@ -229,7 +229,7 @@ fn find_kp_breakpoints<'a, T: Iterator<&'a WordInfo<'a>>>(iter: T, args: &BreakA // go through each active break, extending it and possibly adding a new active // break if we are above the minimum required length for &i in active_breaks.iter() { - let active = linebreaks.get_mut(i); + let active = &mut linebreaks[i]; // normalize demerits to avoid overflow, and record if this is the least active.demerits -= least_demerits; if active.demerits < ld_next { diff --git a/src/paste/paste.rs b/src/paste/paste.rs index e489024e4..fe17917e5 100644 --- a/src/paste/paste.rs +++ b/src/paste/paste.rs @@ -99,7 +99,7 @@ fn paste(filenames: Vec, serial: bool, delimiters: &str) { match file.read_line() { Ok(line) => output.push_str(line.as_slice().slice_to(line.len() - 1)), Err(f) => if f.kind == io::EndOfFile { - *eof.get_mut(i) = true; + eof[i] = true; eof_count += 1; } else { crash!(1, "{}", f.to_string());