Skip to content

Commit 7faeeca

Browse files
committed
---
yaml --- r: 23155 b: refs/heads/master c: 78d19d8 h: refs/heads/master i: 23153: caaeb09 23151: 14e2277 v: v3
1 parent f0af1c4 commit 7faeeca

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9169a1b26a556bbd5befd344a5b0912901859e5d
2+
refs/heads/master: 78d19d8f1bdb64317ebdb072c25ee1240a562095
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libstd/cell.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ fn empty_cell<T>() -> Cell<T> {
1818
impl<T> Cell<T> {
1919
/// Yields the value, failing if the cell is empty.
2020
fn take() -> T {
21-
let value = none;
21+
let mut value = none;
2222
value <-> self.value;
2323
if value.is_none() {
24-
fail "attempt to take an empty cell";
24+
fail ~"attempt to take an empty cell";
2525
}
2626
return option::unwrap(value);
2727
}
2828

2929
/// Returns the value, failing if the cell is full.
3030
fn put_back(+value: T) {
3131
if self.value.is_none() {
32-
fail "attempt to put a value back into a full cell";
32+
fail ~"attempt to put a value back into a full cell";
3333
}
3434
self.value = some(move value);
3535
}
@@ -39,4 +39,3 @@ impl<T> Cell<T> {
3939
self.value.is_none()
4040
}
4141
}
42-

trunk/src/libstd/std.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export ebml, dbg, getopts, json, rand, sha1, term, time, prettyprint;
2626
export test, tempfile, serialization;
2727
export cmp;
2828
export base64;
29+
export cell;
2930

3031
// General io and system-services modules
3132

@@ -45,6 +46,7 @@ mod uv_global_loop;
4546

4647
mod c_vec;
4748
mod timer;
49+
mod cell;
4850

4951
// Concurrency
5052

0 commit comments

Comments
 (0)