File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 22minutes : 10
33---
44
5- # Closures
5+ # Closure traits
66
77Closures or lambda expressions have types which cannot be named. However, they
88implement special [ ` Fn ` ] ( https://doc.rust-lang.org/std/ops/trait.Fn.html ) ,
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ fn main() {
5252 - It is possible to write ` impl VerbosityFilter<StderrLogger> { .. } ` .
5353 - ` VerbosityFilter ` is still generic and you can use ` VerbosityFilter<f64> ` ,
5454 but methods in this block will only be available for
55- ` Point <StderrLogger>` .
55+ ` VerbosityFilter <StderrLogger>` .
5656- Note that we don't put a trait bound on the ` VerbosityFilter ` type itself. You
5757 can put bounds there as well, but generally in Rust we only put the trait
5858 bounds on the impl blocks.
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ fn main() {
2525
2626<details >
2727
28- - Try making a ` NonCloneable ` and passing it to ` duplicate ` .
28+ - Try making a ` NotCloneable ` and passing it to ` duplicate ` .
2929
3030- When multiple traits are necessary, use ` + ` to join them.
3131
Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ impl PartialOrd for Citation {
7272- In practice, it's common to derive these traits, but uncommon to implement
7373 them.
7474
75- - When comparing references in Rust, it will will compare the value of the
76- things pointed to, it will NOT compare the references themselves. That means
77- that references to two different things can compare as equal if the values
78- pointed to are the same:
75+ - When comparing references in Rust, it will compare the value of the things
76+ pointed to, it will NOT compare the references themselves. That means that
77+ references to two different things can compare as equal if the values pointed
78+ to are the same:
7979
8080 ``` rust,editable
8181 fn main() {
You can’t perform that action at this time.
0 commit comments