1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

split: delegate to avoid code duplication in test

This commit is contained in:
Daniel Hofstetter 2025-05-12 10:55:50 +02:00
parent ad9a87118c
commit 0c53409857

View file

@ -112,11 +112,7 @@ impl RandomFile {
/// Add n lines each of size `RandomFile::LINESIZE`
fn add_lines(&mut self, lines: usize) {
let mut n = lines;
while n > 0 {
writeln!(self.inner, "{}", random_chars(Self::LINESIZE)).unwrap();
n -= 1;
}
self.add_lines_with_line_size(lines, Self::LINESIZE);
}
/// Add n lines each of the given size.