Skip to content

Commit

Permalink
Merge pull request Dhghomon#144 from phoenixeliot/patch-1
Browse files Browse the repository at this point in the history
Correct definition of unsigned ints to include zero
  • Loading branch information
Dhghomon authored Dec 16, 2022
2 parents b57f7c5 + fa7cc91 commit 5d3a729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Rust has simple types that are called **primitive types** (primitive = very basi
- Signed integers,
- Unsigned integers.

Signed means `+` (plus sign) and `-` (minus sign), so signed integers can be positive or negative (e.g. +8, -8). But unsigned integers can only be positive, because they do not have a sign.
Signed means `+` (plus sign) and `-` (minus sign), so signed integers can be positive (e.g. +8), negative (e.g. -8), or zero. But unsigned integers can only be positive or zero, because they do not have a sign.

The signed integers are: `i8`, `i16`, `i32`, `i64`, `i128`, and `isize`.
The unsigned integers are: `u8`, `u16`, `u32`, `u64`, `u128`, and `usize`.
Expand Down

0 comments on commit 5d3a729

Please sign in to comment.