Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jan 14, 2024
1 parent 72d32d9 commit 9c950b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/tauri-plugin/src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl<'a> Builder<'a> {
let commands_dir = &autogenerated.join("commands");

if !self.commands.is_empty() {
autogenerate_command_permissions(&commands_dir, self.commands);
autogenerate_command_permissions(commands_dir, self.commands);
}

acl::define_permissions("./permissions/**/*.*")?;
Expand All @@ -101,7 +101,7 @@ fn autogenerate_command_permissions(path: &Path, commands: &[&str]) {
}

for command in commands {
let slugified_command = command.replace("_", "-");
let slugified_command = command.replace('_', "-");
let toml = format!(
r###"# Automatically generated - DO NOT EDIT!
Expand All @@ -123,7 +123,7 @@ commands.deny = [
);

std::fs::write(path.join(format!("{command}.toml")), toml)
.expect(&format!("unable to autogenerate ${command}.toml"));
.unwrap_or_else(|_| panic!("unable to autogenerate ${command}.toml"));
}
}

Expand Down

0 comments on commit 9c950b3

Please sign in to comment.