Test fixes and rebase conflicts

This commit is contained in:
Alex Crichton 2014-10-19 13:00:32 -07:00
parent 9d5d97b55d
commit 96445a533e
4 changed files with 9 additions and 9 deletions

View File

@ -489,15 +489,15 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
}
let argvec: Vec<char> = arg.chars().collect();
for i in range(0u, argvec.len()) {
append_char_at(cmd, &argvec, i);
append_char_at(cmd, argvec.as_slice(), i);
}
if quote {
cmd.push('"');
}
}
fn append_char_at(cmd: &mut String, arg: &Vec<char>, i: uint) {
match *arg.get(i) {
fn append_char_at(cmd: &mut String, arg: &[char], i: uint) {
match arg[i] {
'"' => {
// Escape quotes.
cmd.push_str("\\\"");
@ -517,11 +517,11 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
}
}
fn backslash_run_ends_in_quote(s: &Vec<char>, mut i: uint) -> bool {
while i < s.len() && *s.get(i) == '\\' {
fn backslash_run_ends_in_quote(s: &[char], mut i: uint) -> bool {
while i < s.len() && s[i] == '\\' {
i += 1;
}
return i < s.len() && *s.get(i) == '"';
return i < s.len() && s[i] == '"';
}
}

View File

@ -345,7 +345,7 @@ mod tests {
#[test]
fn spawn_inherits() {
let (tx, rx) = channel();
spawn(proc() {
TaskBuilder::new().spawner(NativeSpawner).spawn(proc() {
spawn(proc() {
let mut task: Box<Task> = Local::take();
match task.maybe_take_runtime::<Ops>() {

View File

@ -11,5 +11,5 @@
fn main() {
let v: Vec<int> = vec!(1, 2, 3);
v[1] = 4; //~ ERROR cannot assign
v[1] = 4; //~ ERROR cannot borrow immutable local variable `v` as mutable
}

View File

@ -9,7 +9,7 @@
// except according to those terms.
use std::task;
use std::sync::atomics::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
use std::rand::{task_rng, Rng, Rand};
const REPEATS: uint = 5;