convert README to markdown
[rust-101.git] / src / part11.rs
index 211cda5734ae9768ba62050dd0a5556c3cbe82e8..9217be831b713c3837b2416fd0300499db53f16c 100644 (file)
@@ -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;
@@ -117,4 +117,4 @@ pub fn main() {
 // to work with an arbitrary type `T` that's passed to the callbacks. Since you need to call multiple callbacks with the
 // same `t: T`, you will either have to restrict `T` to `Copy` types, or pass a borrow.
 
-//@ [index](main.html) | [previous](part10.html) | [next](part12.html)
+//@ [index](main.html) | [previous](part10.html) | [raw source](https://www.ralfj.de/git/rust-101.git/blob_plain/HEAD:/workspace/src/part11.rs) | [next](part12.html)