1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 20:47:46 +00:00

Fix get_mut deprecation warnings

This commit is contained in:
Michael Gehring 2014-11-02 17:10:21 +01:00
parent 476bdcd9d2
commit 71c9797bd7
3 changed files with 3 additions and 3 deletions

View file

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

View file

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

View file

@ -99,7 +99,7 @@ fn paste(filenames: Vec<String>, 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());