Skip to content

Commit

Permalink
trpl: change from "int" to "i32" in Traits
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
durka committed May 15, 2015
1 parent 13a4b83 commit 900f27d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/trpl/traits.md
Expand Up @@ -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
Expand Down

0 comments on commit 900f27d

Please sign in to comment.