From: Ralf Jung Date: Sat, 22 Aug 2015 19:37:30 +0000 (+0200) Subject: typo; emphasis X-Git-Url: https://git.ralfj.de/rust-101.git/commitdiff_plain/8bfc2246138b487afeb99d9d3161951beda75910?ds=sidebyside;hp=--cc typo; emphasis --- 8bfc2246138b487afeb99d9d3161951beda75910 diff --git a/solutions/src/callbacks.rs b/solutions/src/callbacks.rs index a42732d..2b0eeef 100644 --- a/solutions/src/callbacks.rs +++ b/solutions/src/callbacks.rs @@ -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(); + drop(c); c2.call(42); } } \ No newline at end of file diff --git a/src/part14.rs b/src/part14.rs index eb2011a..189a906 100644 --- a/src/part14.rs +++ b/src/part14.rs @@ -59,7 +59,7 @@ fn sort_nums(data: &mut Vec) { } // ## 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() {