MOWE BUG FIXWES ;;;

pull/2/head
Isaac Mills 3 years ago
parent 7f91d6f333
commit 651b1451c1
No known key found for this signature in database
GPG Key ID: B67D7410F33A0F61

File diff suppressed because it is too large Load Diff

@ -150,17 +150,9 @@ impl<'a> UwUify<'a> {
}
fn uwuify_sentence<T: Write>(&self, text: &str, out: &mut T) -> Result<(), std::io::Error> {
text.as_bytes()
.split(|w| matches!(*w, b'\t' | b'\x0C' | b'\r' | b' '))
.scan([].as_ref(), |scan, i| {
let ret = i != &[b' '];
*scan = i;
if ret {
Some(i)
} else {
None
}
})
text.lines().try_for_each(|line| {
line.split_whitespace()
.map(|f| f.as_bytes())
.try_for_each(|word| {
let mut seeder = UwUSeeder::new(word, self.random);
let random_value = seeder.random();
@ -200,6 +192,8 @@ impl<'a> UwUify<'a> {
})?;
}
out.write_all(b" ")
})?;
out.write_all(b"\n")
})
}
}

Loading…
Cancel
Save