deprecate Vec::get

This commit is contained in:
Nick Cameron
2014-07-15 11:37:25 +12:00
parent b35d1a8368
commit aa760a849e
25 changed files with 91 additions and 88 deletions

View File

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

View File

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