mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-04-16 16:39:02 +08:00
9 lines
176 B
Rust
9 lines
176 B
Rust
fn main() {
|
|
// ANCHOR: here
|
|
let example_closure = |x| x;
|
|
|
|
let s = example_closure(String::from("hello"));
|
|
let n = example_closure(5);
|
|
// ANCHOR_END: here
|
|
}
|