This commit is contained in:
Dhghomon 2021-03-24 07:02:41 +00:00
parent f4cd4a150b
commit cdd057c9f3
4 changed files with 4 additions and 4 deletions

View File

@ -232,7 +232,7 @@ fn main() {
// This will try 40,000 times to make a char from a u32.
// The range is 0 (std::u32::MIN) to u32's highest number (std::u32::MAX). If it doesn't work, we will give it '-'.
for _ in 0..40_000 {
let bigger_character = char::try_from(random_generator.gen_range(std::u32::MIN, std::u32::MAX)).unwrap_or('-');
let bigger_character = char::try_from(random_generator.gen_range(std::u32::MIN..std::u32::MAX)).unwrap_or('-');
print!("{}", bigger_character)
}
}

View File

@ -9847,7 +9847,7 @@ fn main() {
// This will try 40,000 times to make a char from a u32.
// The range is 0 (std::u32::MIN) to u32's highest number (std::u32::MAX). If it doesn't work, we will give it '-'.
for _ in 0..40_000 {
let bigger_character = char::try_from(random_generator.gen_range(std::u32::MIN, std::u32::MAX)).unwrap_or('-');
let bigger_character = char::try_from(random_generator.gen_range(std::u32::MIN..std::u32::MAX)).unwrap_or('-');
print!("{}", bigger_character)
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long