trpl: change from "int" to "i32" in Traits
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
This commit is contained in:
parent
13a4b83c1a
commit
900f27dc7c
@ -208,7 +208,7 @@ let result = f.write("whatever".as_bytes());
|
||||
|
||||
This will compile without error.
|
||||
|
||||
This means that even if someone does something bad like add methods to `int`,
|
||||
This means that even if someone does something bad like add methods to `i32`,
|
||||
it won’t affect you, unless you `use` that trait.
|
||||
|
||||
There’s one more restriction on implementing traits. Either the trait or the
|
||||
|
Loading…
x
Reference in New Issue
Block a user