We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 402907e + 0c53409 commit 8866ec3Copy full SHA for 8866ec3
tests/by-util/test_split.rs
@@ -17,9 +17,7 @@ use std::{
17
};
18
use uutests::util::{AtPath, TestScenario};
19
20
-use uutests::at_and_ucmd;
21
-use uutests::new_ucmd;
22
-use uutests::util_name;
+use uutests::{at_and_ucmd, new_ucmd, util_name};
23
24
fn random_chars(n: usize) -> String {
25
rng()
@@ -114,11 +112,7 @@ impl RandomFile {
114
112
115
113
/// Add n lines each of size `RandomFile::LINESIZE`
116
fn add_lines(&mut self, lines: usize) {
117
- let mut n = lines;
118
- while n > 0 {
119
- writeln!(self.inner, "{}", random_chars(Self::LINESIZE)).unwrap();
120
- n -= 1;
121
- }
+ self.add_lines_with_line_size(lines, Self::LINESIZE);
122
}
123
124
/// Add n lines each of the given size.
0 commit comments