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:
parent
ad9a87118c
commit
0c53409857
1 changed files with 1 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue