Skip to content

Commit

Permalink
chore: simplify some code
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Jan 18, 2025
1 parent 71f154a commit 7539f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/maa-cli/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ pub fn import(src: &Path, force: bool, config_type: &str) -> std::io::Result<()>
// check if the file name is cli with supported extension for cli configuration
if file
.file_stem()
.is_some_and(|stem| stem.to_str().is_some_and(|stem| stem == "cli"))
.is_some_and(|stem| stem.to_str() == Some("cli"))
&& Filetype::is_valid_file(file)
{
let cli_path = dirs::config().join("cli");
Expand Down
2 changes: 1 addition & 1 deletion crates/maa-cli/src/run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ where
})?;

if let Some(s) = task_summary.as_mut() {
s.insert(id, task.name.map(Into::into), task_type);
s.insert(id, task.name, task_type);
}
}
if let Some(s) = task_summary {
Expand Down

0 comments on commit 7539f2f

Please sign in to comment.