mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-31 21:17:46 +00:00
Fix get_mut deprecation warnings
This commit is contained in:
parent
476bdcd9d2
commit
71c9797bd7
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue