fix(cli): clippy warnings on macOS (#9456)

This commit is contained in:
Kornel 2024-04-15 08:22:19 +01:00 committed by GitHub
parent 8f4b1050c4
commit cd23bb2ca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 15 deletions

View File

@ -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,

View File

@ -19,7 +19,7 @@ use tauri_utils::display_path;
use std::{
fs::{self, File},
io::{prelude::*, Write},
io::prelude::*,
path::{Path, PathBuf},
};

View File

@ -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

View File

@ -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

View File

@ -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"),

View File

@ -15,7 +15,6 @@ use std::{
collections::{HashMap, HashSet},
fs::File,
io::{Read, Write},
iter::FromIterator,
path::Path,
};

View File

@ -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);