Skip to content

Commit bfe05b8

Browse files
committed
sh: fix test warnings
1 parent 1f69ad1 commit bfe05b8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

sh/src/wordexp/parameter.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ mod tests {
366366
false,
367367
false,
368368
shell,
369-
);
369+
)
370+
.unwrap();
370371
expanded_word.to_string()
371372
}
372373

@@ -383,7 +384,8 @@ mod tests {
383384
inside_double_quotes,
384385
field_splitting_will_be_performed,
385386
shell,
386-
);
387+
)
388+
.unwrap();
387389
expanded_word
388390
}
389391

sh/src/wordexp/pathname.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ pub mod tests {
186186
}
187187

188188
#[derive(Default)]
189-
pub struct TestFileSystem {
189+
struct TestFileSystem {
190190
root: Directory,
191191
}
192192

193193
impl TestFileSystem {
194-
pub fn get_dir(&self, path: &Path) -> Option<&Directory> {
194+
fn get_dir(&self, path: &Path) -> Option<&Directory> {
195195
let mut current_dir = &self.root;
196196
for entry in path.into_iter() {
197197
let next_dir_name = entry.to_str().unwrap();
@@ -205,7 +205,7 @@ pub mod tests {
205205
Some(current_dir)
206206
}
207207

208-
pub fn add_file(mut self, path: &str) -> Self {
208+
fn add_file(mut self, path: &str) -> Self {
209209
let path = PathBuf::from(path);
210210
let mut current_dir = &mut self.root;
211211
if let Some(file_path) = path.parent() {

0 commit comments

Comments
 (0)