projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
53b9ab5
)
Fix if -> of typo
author
Deepak Sirone
<deepaksirone94@gmail.com>
Tue, 7 Jun 2016 03:59:49 +0000
(09:29 +0530)
committer
Deepak Sirone
<deepaksirone94@gmail.com>
Tue, 7 Jun 2016 03:59:49 +0000
(09:29 +0530)
src/part12.rs
patch
|
blob
|
history
diff --git
a/src/part12.rs
b/src/part12.rs
index 62f08681fbd3611b7842489679bb14017e66bd9b..7d03ca61c0d1a238618ff996835a1e783d5cd525 100644
(file)
--- a/
src/part12.rs
+++ b/
src/part12.rs
@@
-71,7
+71,7
@@
pub fn main() {
fn demo_cell(c: &mut Callbacks) {
{
let count = Cell::new(0);
fn demo_cell(c: &mut Callbacks) {
{
let count = Cell::new(0);
- // Again, we have to move ownership
i
f the `count` into the environment closure.
+ // Again, we have to move ownership
o
f the `count` into the environment closure.
c.register(move |val| {
// In here, all we have is a shared reference of our environment. But that's good enough for the `get` and `set` of the cell!
//@ At run-time, the `Cell` will be almost entirely compiled away, so this becomes pretty much equivalent to the version
c.register(move |val| {
// In here, all we have is a shared reference of our environment. But that's good enough for the `get` and `set` of the cell!
//@ At run-time, the `Cell` will be almost entirely compiled away, so this becomes pretty much equivalent to the version