Skip to content

Commit

Permalink
Remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Jan 18, 2025
1 parent 149ca07 commit e3fd925
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/elements/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub trait Command {
Ok(ForkResult::Child) => {
core.initialize_as_subshell(Pid::from_raw(0), pipe.pgid);
io::connect(pipe, self.get_redirects(), core);
self.run(core, true);
let _ = self.run(core, true);
exit::normal(core)
},
Ok(ForkResult::Parent { child } ) => {
Expand All @@ -73,7 +73,7 @@ pub trait Command {

fn nofork_exec(&mut self, core: &mut ShellCore) -> Result<Option<Pid>, ExecError> {
if self.get_redirects().iter_mut().all(|r| r.connect(true, core)){
self.run(core, false);
let _ = self.run(core, false);
}else{
core.db.exit_status = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/elements/command/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Command for SimpleCommand {

if core.db.functions.contains_key(&self.args[0]) {
let mut f = core.db.functions[&self.args[0]].clone();
f.run_as_command(&mut self.args, core);
let _ = f.run_as_command(&mut self.args, core);
} else if core.builtins.contains_key(&self.args[0]) {
let mut special_args = self.substitutions_as_args.iter()
.map(|a| a.text.clone()).collect();
Expand Down
2 changes: 1 addition & 1 deletion src/feeder/terminal/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Terminal {

if let Ok(Some(mut a)) = SimpleCommand::parse(&mut feeder, core) {
let mut dummy = Pipe::new("".to_string());
a.exec(core, &mut dummy);
let _ = a.exec(core, &mut dummy);
}
match core.db.len("COMPREPLY") {
0 => Err("no completion cand".to_string()),
Expand Down
2 changes: 1 addition & 1 deletion test/ok
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
./test_script.bash
./test_options.bash
./test_glob.bash
./test_redirects.bash
./test_glob.bash
./test_brace.bash
./test_builtins.bash
./test_others.bash
Expand Down

0 comments on commit e3fd925

Please sign in to comment.