From 3290825e82e4b9bb54348fbc49682979a70d9163 Mon Sep 17 00:00:00 2001 From: MarcelStruckWO Date: Mon, 15 Apr 2024 15:52:12 +0200 Subject: [PATCH] Fix clippy --- src/commands/package.rs | 15 ++++++++------- src/lib.rs | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/commands/package.rs b/src/commands/package.rs index 4b9bfc6..230be3d 100644 --- a/src/commands/package.rs +++ b/src/commands/package.rs @@ -12,13 +12,13 @@ use execute::{command, Execute}; use indicatif::MultiProgress; use crate::bindings::generate_bindings; +use crate::console::*; use crate::console::{run_step, run_step_with_commands}; use crate::lib_type::LibType; use crate::metadata::{metadata, MetadataExt}; use crate::swiftpackage::{create_swiftpackage, recreate_output_dir}; use crate::targets::*; use crate::xcframework::create_xcframework; -use crate::console::*; #[derive(ValueEnum, Debug, Clone)] #[value()] @@ -55,7 +55,8 @@ pub struct FeatureOptions { pub no_default_features: bool, } -pub fn run( +#[allow(clippy::too_many_arguments)] +pub fn run( platforms: Option>, package_name: Option, disable_warnings: bool, @@ -80,7 +81,7 @@ pub fn run( &config, mode, lib_type_arg, - features, + features, skip_toolchains_check, ); } else if package_name.is_some() { @@ -134,7 +135,7 @@ fn run_for_crate( if lib_type == LibType::Dynamic { warning!( - &config, + &config, "Building as dynamic library is discouraged. It might prevent apps that use this library from publishing to the App Store." ); } @@ -360,7 +361,7 @@ fn generate_bindings_with_output( lib_name: &str, mode: Mode, lib_type: LibType, - config: &Config + config: &Config, ) -> Result<()> { run_step(config, "Generating Swift bindings...", || { let lib_file = library_file_name(lib_name, lib_type); @@ -377,7 +378,7 @@ fn generate_bindings_with_output( }) } -fn build_with_output( +fn build_with_output( target: &Target, lib_name: &str, mode: Mode, @@ -385,7 +386,7 @@ fn build_with_output( config: &Config, features: &FeatureOptions, ) -> Result<()> { - let mut commands = target. commands(lib_name, mode, lib_type, features); + let mut commands = target.commands(lib_name, mode, lib_type, features); for command in &mut commands { command.env("CARGO_TERM_COLOR", "always"); } diff --git a/src/lib.rs b/src/lib.rs index 6f3985a..1ab79a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,9 +31,9 @@ mod targets; mod templating; mod xcframework; -pub use commands::*; pub use crate::console::error::Result; pub use crate::console::Config; +pub use commands::*; pub use lib_type::LibType; pub use targets::*;