Skip to content

Commit

Permalink
Replace closure map example with direct calls
Browse files Browse the repository at this point in the history
  • Loading branch information
randomPoison committed Feb 28, 2025
1 parent 611306a commit 7305ce0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/closures/capturing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ fn main() {
v
}
};
println!(
"clamped values at {max_value}: {:?}",
(0..10).map(clamp).collect::<Vec<_>>()
);
dbg!(clamp(1));
dbg!(clamp(3));
dbg!(clamp(5));
dbg!(clamp(7));
dbg!(clamp(10));
}
```

Expand Down

0 comments on commit 7305ce0

Please sign in to comment.