Merge pull request #144 from phoenixeliot/patch-1

Correct definition of unsigned ints to include zero
pull/155/head
Dhghomon 1 year ago committed by GitHub
commit 5d3a729b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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`.

Loading…
Cancel
Save