Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ jobs:
- run: cargo machete --with-metadata
- run: ./scripts/test-standalone.sh
- run: mise run lint
- run: cargo clippy -- -D warnings
- run: cargo clippy --all-features --all-targets -- -D warnings

nightly:
Expand Down
16 changes: 8 additions & 8 deletions src/cli/tasks/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ impl TasksAdd {
if let Some(description) = &self.description {
lines.push("#MISE description=\"".to_string() + description + "\"");
}
if self.dir.is_some() {
lines.push("#MISE dir=".to_string() + &self.dir.unwrap());
if let Some(dir) = &self.dir {
lines.push("#MISE dir=".to_string() + dir);
}
if self.hide {
lines.push("#MISE hide=true".to_string());
Expand Down Expand Up @@ -165,8 +165,8 @@ impl TasksAdd {
}
task.insert("wait_for", Item::Value(wait_for.into()));
}
if self.description.is_some() {
task.insert("description", self.description.unwrap().into());
if let Some(description) = &self.description {
task.insert("description", description.clone().into());
}
if !self.alias.is_empty() {
let mut alias = toml_edit::Array::new();
Expand All @@ -175,8 +175,8 @@ impl TasksAdd {
}
task.insert("alias", Item::Value(alias.into()));
}
if self.dir.is_some() {
task.insert("dir", self.dir.unwrap().into());
if let Some(dir) = &self.dir {
task.insert("dir", dir.clone().into());
}
if self.hide {
task.insert("hide", true.into());
Expand All @@ -198,8 +198,8 @@ impl TasksAdd {
}
task.insert("outputs", Item::Value(outputs.into()));
}
if self.shell.is_some() {
task.insert("shell", self.shell.unwrap().into());
if let Some(shell) = &self.shell {
task.insert("shell", shell.clone().into());
}
if self.quiet {
task.insert("quiet", true.into());
Expand Down
2 changes: 1 addition & 1 deletion src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ enum ChildProcessOutput {
mod tests {
use pretty_assertions::assert_eq;

use crate::{cmd, config::Config};
use crate::config::Config;

#[tokio::test]
async fn test_cmd() {
Expand Down
3 changes: 1 addition & 2 deletions src/lockfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,9 @@ fn merge_tool_entries_with_env(
entry.1.insert(e.clone());
}
}
} else if existing_tool.env.is_some() {
} else if let Some(existing_envs) = &existing_tool.env {
// Check if this env is already covered by a new entry
// If so, the existing entry is stale and should not be preserved
let existing_envs = existing_tool.env.as_ref().unwrap();
let env_already_covered = by_key
.values()
.any(|(_, new_envs, _)| existing_envs.iter().any(|e| new_envs.contains(e)));
Expand Down
2 changes: 1 addition & 1 deletion src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl PathExt for Path {
}

fn mount(&self, on: &Path) -> PathBuf {
if self.is_empty() {
if PathExt::is_empty(self) {
on.to_path_buf()
} else {
on.join(self)
Expand Down
Loading