typo; emphasis
authorRalf Jung <post@ralfj.de>
Sat, 22 Aug 2015 19:37:30 +0000 (21:37 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 22 Aug 2015 19:37:30 +0000 (21:37 +0200)
solutions/src/callbacks.rs
src/part14.rs

index a42732dc2e5e88bc5a0faeb22e609da0e57bec75..2b0eeefaa71b49452ed745751941fe1b81d8c55b 100644 (file)
@@ -65,6 +65,7 @@ mod tests {
         // We do a clone, and call `call` on that one. This makes sure that it's not our `RefCell` that complains about two mutable borrows,
         // but rather the `RefCell` inside the `CallbacksMut`.
         let mut c2: Callbacks = c.borrow().clone();
         // We do a clone, and call `call` on that one. This makes sure that it's not our `RefCell` that complains about two mutable borrows,
         // but rather the `RefCell` inside the `CallbacksMut`.
         let mut c2: Callbacks = c.borrow().clone();
+        drop(c);
         c2.call(42);
     }
 }
\ No newline at end of file
         c2.call(42);
     }
 }
\ No newline at end of file
index eb2011a958f5377f2a36642aa79794427a42fce8..189a9060f8bf7fd195fb31409077a7a5dec1048a 100644 (file)
@@ -59,7 +59,7 @@ fn sort_nums(data: &mut Vec<i32>) {
 }
 
 // ## Arrays
 }
 
 // ## Arrays
-//@ An *array* in Rust is given be the type `[T; n]`, where `n` is some *fixed* number. So, `[f64; 10]` is an array of 10 floating-point
+//@ An *array* in Rust is given by the type `[T; n]`, where `n` is some *fixed* number. So, `[f64; 10]` is an array of 10 floating-point
 //@ numbers, all one right next to the other in memory. Arrays are sized, and hence can be used like any other type. But we can also
 //@ borrow them as slices, e.g., to sort them.
 fn sort_array() {
 //@ numbers, all one right next to the other in memory. Arrays are sized, and hence can be used like any other type. But we can also
 //@ borrow them as slices, e.g., to sort them.
 fn sort_array() {