Skip to content

Commit 96445a5

Browse files
committed
Test fixes and rebase conflicts
1 parent 9d5d97b commit 96445a5

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/libnative/io/process.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,15 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
489489
}
490490
let argvec: Vec<char> = arg.chars().collect();
491491
for i in range(0u, argvec.len()) {
492-
append_char_at(cmd, &argvec, i);
492+
append_char_at(cmd, argvec.as_slice(), i);
493493
}
494494
if quote {
495495
cmd.push('"');
496496
}
497497
}
498498

499-
fn append_char_at(cmd: &mut String, arg: &Vec<char>, i: uint) {
500-
match *arg.get(i) {
499+
fn append_char_at(cmd: &mut String, arg: &[char], i: uint) {
500+
match arg[i] {
501501
'"' => {
502502
// Escape quotes.
503503
cmd.push_str("\\\"");
@@ -517,11 +517,11 @@ fn make_command_line(prog: &CString, args: &[CString]) -> String {
517517
}
518518
}
519519

520-
fn backslash_run_ends_in_quote(s: &Vec<char>, mut i: uint) -> bool {
521-
while i < s.len() && *s.get(i) == '\\' {
520+
fn backslash_run_ends_in_quote(s: &[char], mut i: uint) -> bool {
521+
while i < s.len() && s[i] == '\\' {
522522
i += 1;
523523
}
524-
return i < s.len() && *s.get(i) == '"';
524+
return i < s.len() && s[i] == '"';
525525
}
526526
}
527527

src/libnative/task.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ mod tests {
345345
#[test]
346346
fn spawn_inherits() {
347347
let (tx, rx) = channel();
348-
spawn(proc() {
348+
TaskBuilder::new().spawner(NativeSpawner).spawn(proc() {
349349
spawn(proc() {
350350
let mut task: Box<Task> = Local::take();
351351
match task.maybe_take_runtime::<Ops>() {

src/test/compile-fail/writing-to-immutable-vec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111

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

src/test/run-pass/vector-sort-failure-safe.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use std::task;
12-
use std::sync::atomics::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
12+
use std::sync::atomic::{AtomicUint, INIT_ATOMIC_UINT, Relaxed};
1313
use std::rand::{task_rng, Rng, Rand};
1414

1515
const REPEATS: uint = 5;

0 commit comments

Comments
 (0)