Remove die!, raplace invocations with fail! Issue #4524 pt 3
This commit is contained in:
parent
c51ecc3223
commit
4445b38df2
363 changed files with 910 additions and 906 deletions
|
@ -32,7 +32,7 @@ impl<T> Cell<T> {
|
|||
/// Yields the value, failing if the cell is empty.
|
||||
fn take() -> T {
|
||||
if self.is_empty() {
|
||||
die!(~"attempt to take an empty cell");
|
||||
fail!(~"attempt to take an empty cell");
|
||||
}
|
||||
|
||||
let mut value = None;
|
||||
|
@ -43,7 +43,7 @@ impl<T> Cell<T> {
|
|||
/// Returns the value, failing if the cell is full.
|
||||
fn put_back(value: T) {
|
||||
if !self.is_empty() {
|
||||
die!(~"attempt to put a value back into a full cell");
|
||||
fail!(~"attempt to put a value back into a full cell");
|
||||
}
|
||||
self.value = Some(move value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue