Skip to content

Commit

Permalink
fix(cli): clippy warnings on macOS (#9456)
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski authored Apr 15, 2024
1 parent 8f4b105 commit cd23bb2
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tooling/bundler/src/bundle/macos/ios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use crate::{bundle::common, Settings};

use anyhow::Context;
use image::{self, codecs::png::PngDecoder, GenericImageView, ImageDecoder};
use image::{codecs::png::PngDecoder, GenericImageView, ImageDecoder};

use std::{
collections::BTreeSet,
Expand Down
2 changes: 1 addition & 1 deletion tooling/bundler/src/bundle/updater_bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use tauri_utils::display_path;

use std::{
fs::{self, File},
io::{prelude::*, Write},
io::prelude::*,
path::{Path, PathBuf},
};

Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub fn setup(
}

if options.runner.is_none() {
options.runner = config_.build.runner.clone();
options.runner.clone_from(&config_.build.runner);
}

options
Expand Down
9 changes: 2 additions & 7 deletions tooling/cli/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,9 @@ pub fn setup(
}

if options.runner.is_none() {
options.runner = config
.lock()
.unwrap()
.as_ref()
.unwrap()
.build
options
.runner
.clone();
.clone_from(&config.lock().unwrap().as_ref().unwrap().build.runner);
}

let mut cargo_features = config
Expand Down
6 changes: 3 additions & 3 deletions tooling/cli/src/helpers/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ pub fn install_one(options: CargoInstallOptions) -> crate::Result<()> {

match (options.tag, options.rev, options.branch) {
(Some(tag), None, None) => {
cargo.args(["--tag", &tag]);
cargo.args(["--tag", tag]);
}
(None, Some(rev), None) => {
cargo.args(["--rev", &rev]);
cargo.args(["--rev", rev]);
}
(None, None, Some(branch)) => {
cargo.args(["--branch", &branch]);
cargo.args(["--branch", branch]);
}
(None, None, None) => {}
_ => anyhow::bail!("Only one of --tag, --rev and --branch can be specified"),
Expand Down
1 change: 0 additions & 1 deletion tooling/cli/src/interface/rust/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use std::{
collections::{HashMap, HashSet},
fs::File,
io::{Read, Write},
iter::FromIterator,
path::Path,
};

Expand Down
2 changes: 1 addition & 1 deletion tooling/cli/src/mobile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub fn get_app(config: &TauriConfig, interface: &AppInterface) -> App {
domain.push('.');
}
if domain.is_empty() {
domain = config.identifier.clone();
domain.clone_from(&config.identifier);
if domain.is_empty() {
log::error!("Bundle identifier set in `tauri.conf.json > identifier` cannot be empty");
exit(1);
Expand Down

0 comments on commit cd23bb2

Please sign in to comment.