diff --git a/src/main.rs b/src/main.rs index 6208702..bf9e3de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,7 +14,9 @@ fn main() { args.next().unwrap(); let min_syllables: usize = args.next().expect("one arg").parse().expect("a number"); - let mut message = String::with_capacity(128); + // the vast, vast majority of discord messages are under 2000 chars, so this avoids + // reallocating + let mut message = String::with_capacity(2048); io::stdin() .read_to_string(&mut message) .expect("i want a message");