deprecate Vec::get
This commit is contained in:
@@ -373,7 +373,7 @@ pub fn parse_opts(args: &[String]) -> Option<OptRes> {
|
||||
if matches.opt_present("h") { usage(args[0].as_slice()); return None; }
|
||||
|
||||
let filter = if matches.free.len() > 0 {
|
||||
let s = matches.free.get(0).as_slice();
|
||||
let s = matches.free[0].as_slice();
|
||||
match Regex::new(s) {
|
||||
Ok(re) => Some(re),
|
||||
Err(e) => return Some(Err(format!("could not parse /{}/: {}", s, e)))
|
||||
|
||||
@@ -175,7 +175,7 @@ impl<'a,T: FloatMath + FromPrimitive> Stats<T> for &'a [T] {
|
||||
// This inner loop applies `hi`/`lo` summation to each
|
||||
// partial so that the list of partial sums remains exact.
|
||||
for i in range(0, partials.len()) {
|
||||
let mut y = *partials.get(i);
|
||||
let mut y = partials[i];
|
||||
if num::abs(x) < num::abs(y) {
|
||||
mem::swap(&mut x, &mut y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user