Skip to content

Commit

Permalink
Merge pull request #1327 from faern/use-assoc-int-consts
Browse files Browse the repository at this point in the history
Use T::MAX instead of std::T::MAX where T is an integer
  • Loading branch information
steveklabnik authored Apr 6, 2020
2 parents 05a98da + 3a2e962 commit a663846
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/cast.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() {
println!("Casting: {} -> {} -> {}", decimal, integer, character);
// when casting any value to an unsigned type, T,
// std::T::MAX + 1 is added or subtracted until the value
// T::MAX + 1 is added or subtracted until the value
// fits into the new type
// 1000 already fits in a u16
Expand Down

0 comments on commit a663846

Please sign in to comment.