Skip to content

Commit

Permalink
fmt/clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Sep 10, 2024
1 parent 8a8644d commit 9b941d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions crates/deno_task_shell/src/shell/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ impl ShellState {
alias.clone(),
cmd.split_whitespace().map(ToString::to_string).collect(),
);
},
}
EnvChange::UnAliasCommand(alias) => {
println!("unalias {}", alias);
self.alias.remove(alias);
}
}
Expand Down
8 changes: 6 additions & 2 deletions crates/shell/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl ShellCommand for AliasCommand {
}

// parse the args
let env_change = if let Some((alias, cmd)) = context.args[0].split_once("=") {
let env_change = if let Some((alias, cmd)) = context.args[0].split_once('=') {
vec![EnvChange::AliasCommand(alias.into(), cmd.into())]
} else {
return Box::pin(futures::future::ready(ExecuteResult::from_exit_code(1)));
Expand All @@ -34,7 +34,11 @@ impl ShellCommand for UnAliasCommand {
return Box::pin(futures::future::ready(ExecuteResult::from_exit_code(1)));
}

let result = ExecuteResult::Continue(0, vec![EnvChange::UnAliasCommand(context.args[0].clone())], Vec::default());
let result = ExecuteResult::Continue(
0,
vec![EnvChange::UnAliasCommand(context.args[0].clone())],
Vec::default(),
);
Box::pin(futures::future::ready(result))
}
}
Expand Down

0 comments on commit 9b941d8

Please sign in to comment.