Skip to content

Commit 0c53409

Browse files
committed
split: delegate to avoid code duplication in test
1 parent ad9a871 commit 0c53409

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

tests/by-util/test_split.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ impl RandomFile {
112112

113113
/// Add n lines each of size `RandomFile::LINESIZE`
114114
fn add_lines(&mut self, lines: usize) {
115-
let mut n = lines;
116-
while n > 0 {
117-
writeln!(self.inner, "{}", random_chars(Self::LINESIZE)).unwrap();
118-
n -= 1;
119-
}
115+
self.add_lines_with_line_size(lines, Self::LINESIZE);
120116
}
121117

122118
/// Add n lines each of the given size.

0 commit comments

Comments
 (0)