Remove out.writeall() for whitespace

pull/6/head
sgoudham 3 years ago
parent 02a1b77327
commit 526f42cf98
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -9,10 +9,9 @@ use ahash::RandomState;
use linkify::{LinkFinder, LinkKind}; use linkify::{LinkFinder, LinkKind};
use memmap::Mmap; use memmap::Mmap;
use constants::ACTIONS_SIZE; use constants::{
use constants::FACES; ACTIONS, ACTIONS_SIZE, ASCII_FACES, ASCII_FACES_SIZE, MIXED_FACES, MIXED_FACES_SIZE,
use constants::FACES_SIZE; };
use constants::{ACTIONS, ASCII, ASCII_SIZE};
mod constants; mod constants;
@ -182,11 +181,14 @@ impl<'a> UwUify<'a> {
if !self.is_runtime { if !self.is_runtime {
if random_value <= self.faces { if random_value <= self.faces {
if self.ascii { if self.ascii {
out.write_all(ASCII[random_int!(&mut seeder, 0..ASCII_SIZE)])?; out.write_all(
ASCII_FACES[random_int!(&mut seeder, 0..ASCII_FACES_SIZE)],
)?;
} else { } else {
out.write_all(FACES[random_int!(&mut seeder, 0..FACES_SIZE)])?; out.write_all(
MIXED_FACES[random_int!(&mut seeder, 0..MIXED_FACES_SIZE)],
)?;
} }
out.write_all(b" ")?;
} else if random_value <= self.actions { } else if random_value <= self.actions {
out.write_all(ACTIONS[random_int!(&mut seeder, 0..ACTIONS_SIZE)])?; out.write_all(ACTIONS[random_int!(&mut seeder, 0..ACTIONS_SIZE)])?;
} else if random_value <= self.stutters { } else if random_value <= self.stutters {
@ -200,11 +202,14 @@ impl<'a> UwUify<'a> {
} else { } else {
if random_value <= self.faces { if random_value <= self.faces {
if self.ascii { if self.ascii {
out.write_all(ASCII[random_int!(&mut seeder, 0..ASCII_SIZE)])?; out.write_all(
ASCII_FACES[random_int!(&mut seeder, 0..ASCII_FACES_SIZE)],
)?;
} else { } else {
out.write_all(FACES[random_int!(&mut seeder, 0..FACES_SIZE)])?; out.write_all(
MIXED_FACES[random_int!(&mut seeder, 0..MIXED_FACES_SIZE)],
)?;
} }
out.write_all(b" ")?;
} }
if random_value <= self.actions { if random_value <= self.actions {
out.write_all(ACTIONS[random_int!(&mut seeder, 0..ACTIONS_SIZE)])?; out.write_all(ACTIONS[random_int!(&mut seeder, 0..ACTIONS_SIZE)])?;

Loading…
Cancel
Save