mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
fix: unnecessary space
This commit is contained in:
@ -46,7 +46,7 @@ fn main() {
|
||||
// A non-copy type.
|
||||
let movable = Box::new(3);
|
||||
|
||||
// A copy type would copy into the closure leaving the original untouched.
|
||||
// A copy type would copy into the closure leaving the original untouched.
|
||||
// A non-copy must move and so `movable` immediately moves into
|
||||
// the closure.
|
||||
let consume = || {
|
||||
@ -55,7 +55,7 @@ fn main() {
|
||||
};
|
||||
|
||||
consume();
|
||||
// consume();
|
||||
// consume();
|
||||
}
|
||||
|
||||
fn take<T>(_v: T) {
|
||||
@ -68,7 +68,7 @@ fn main() {
|
||||
// A non-copy type.
|
||||
let movable = Box::new(3);
|
||||
|
||||
// A copy type would copy into the closure leaving the original untouched.
|
||||
// A copy type would copy into the closure leaving the original untouched.
|
||||
// A non-copy must move and so `movable` immediately moves into
|
||||
// the closure.
|
||||
let consume = || {
|
||||
|
Reference in New Issue
Block a user