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:
Alex Burka 2015-05-15 12:14:39 -04:00
parent 13a4b83c1a
commit 900f27dc7c

View File

@ -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 wont affect you, unless you `use` that trait.
Theres one more restriction on implementing traits. Either the trait or the