From: Ralf Jung Date: Sat, 5 Sep 2015 12:12:45 +0000 (+0200) Subject: Merge pull request #3 from nelsonjchen/typo_fix X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/f41a988984bb5487de50168403c5e9a666512595?hp=663d6d7061ead4b53beec69f3ad67ce488f5a924 Merge pull request #3 from nelsonjchen/typo_fix Fix usize typo --- diff --git a/src/part11.rs b/src/part11.rs index 7361604..9217be8 100644 --- a/src/part11.rs +++ b/src/part11.rs @@ -87,7 +87,7 @@ pub fn main() { //@ that doesn't work out this time. Remember the `'static` bound above? Borrowing `count` in the environment would //@ violate that bound, as the borrow is only valid for this block. If the callbacks are triggered later, we'd be in trouble. //@ We have to explicitly tell Rust to `move` ownership of the variable into the closure. Its environment will then contain a - //@ `usize` rather than a `&mut uszie`, and the closure has no effect on this local variable anymore. + //@ `usize` rather than a `&mut usize`, and the closure has no effect on this local variable anymore. let mut count: usize = 0; c.register_generic(move |val| { count = count+1;