mirror of
https://github.com/sunface/rust-by-practice.git
synced 2025-06-23 04:29:41 +00:00
Merge pull request #401 from skaunov/patch-5
Update solution closure.md
This commit is contained in:
@ -118,7 +118,7 @@ fn main() {
|
|||||||
```rust
|
```rust
|
||||||
fn fn_once<F>(func: F)
|
fn fn_once<F>(func: F)
|
||||||
where
|
where
|
||||||
F: FnOnce(usize) -> bool + Copy,// 改动在这里
|
F: Copy + FnOnce(usize) -> bool,// 改动在这里
|
||||||
{
|
{
|
||||||
println!("{}", func(3));
|
println!("{}", func(3));
|
||||||
println!("{}", func(4));
|
println!("{}", func(4));
|
||||||
|
Reference in New Issue
Block a user