2023-01-16 17:34:52 +08:00
|
|
|
$ cargo run
|
2024-10-20 23:44:05 +08:00
|
|
|
Locking 1 package to latest compatible version
|
|
|
|
Adding closure-example v0.1.0 (/Users/chris/dev/rust-lang/book/tmp/listings/ch13-functional-features/listing-13-04)
|
2023-01-16 17:34:52 +08:00
|
|
|
Compiling closure-example v0.1.0 (file:///projects/closure-example)
|
2024-06-06 21:23:21 +08:00
|
|
|
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.43s
|
2023-01-16 17:34:52 +08:00
|
|
|
Running `target/debug/closure-example`
|
|
|
|
Before defining closure: [1, 2, 3]
|
|
|
|
Before calling closure: [1, 2, 3]
|
|
|
|
From closure: [1, 2, 3]
|
|
|
|
After calling closure: [1, 2, 3]
|