Drop the '2' suffix from logging macros

Who doesn't like a massive renaming?
This commit is contained in:
Alex Crichton 2013-10-21 13:08:31 -07:00
parent 15a6bdebab
commit daf5f5a4d1
726 changed files with 3060 additions and 3060 deletions

View file

@ -33,7 +33,7 @@ impl Drop for DynamicLibrary {
}
} {
Ok(()) => {},
Err(str) => fail2!("{}", str)
Err(str) => fail!("{}", str)
}
}
}
@ -94,13 +94,13 @@ mod test {
// The math library does not need to be loaded since it is already
// statically linked in
let libm = match DynamicLibrary::open(None) {
Err(error) => fail2!("Could not load self as module: {}", error),
Err(error) => fail!("Could not load self as module: {}", error),
Ok(libm) => libm
};
let cosine: extern fn(libc::c_double) -> libc::c_double = unsafe {
match libm.symbol("cos") {
Err(error) => fail2!("Could not load function cos: {}", error),
Err(error) => fail!("Could not load function cos: {}", error),
Ok(cosine) => cosine
}
};
@ -109,7 +109,7 @@ mod test {
let expected_result = 1.0;
let result = cosine(argument);
if result != expected_result {
fail2!("cos({:?}) != {:?} but equaled {:?} instead", argument,
fail!("cos({:?}) != {:?} but equaled {:?} instead", argument,
expected_result, result)
}
}
@ -124,7 +124,7 @@ mod test {
let path = GenericPath::new("/dev/null");
match DynamicLibrary::open(Some(&path)) {
Err(_) => {}
Ok(_) => fail2!("Successfully opened the empty library.")
Ok(_) => fail!("Successfully opened the empty library.")
}
}
}

View file

@ -87,7 +87,7 @@ fn test_fail() {
let mut i = 0;
do (|| {
i = 10;
fail2!();
fail!();
}).finally {
assert!(failing());
assert_eq!(i, 10);

View file

@ -172,7 +172,7 @@ impl<T: Send> UnsafeArc<T> {
// If 'put' returns the server end back to us, we were rejected;
// someone else was trying to unwrap. Avoid guaranteed deadlock.
cast::forget(data);
fail2!("Another task is already unwrapping this Arc!");
fail!("Another task is already unwrapping this Arc!");
}
}
}
@ -386,7 +386,7 @@ impl<T:Send> Exclusive<T> {
let rec = self.x.get();
do (*rec).lock.lock {
if (*rec).failed {
fail2!("Poisoned Exclusive::new - another task failed inside!");
fail!("Poisoned Exclusive::new - another task failed inside!");
}
(*rec).failed = true;
let result = f(&mut (*rec).data);
@ -617,7 +617,7 @@ mod tests {
let x2 = x.clone();
do task::spawn {
do 10.times { task::deschedule(); } // try to let the unwrapper go
fail2!(); // punt it awake from its deadlock
fail!(); // punt it awake from its deadlock
}
let _z = x.unwrap();
unsafe { do x2.with |_hello| { } }