Skip to content

Commit

Permalink
chore: Fix clippy 1.84 warnings (#12339)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Jan 10, 2025
1 parent b3c258d commit e98cd59
Show file tree
Hide file tree
Showing 11 changed files with 709 additions and 523 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.71
override: true
- name: setup node
uses: actions/setup-node@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-cli-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.71.0
override: true

- name: install Linux dependencies
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn copy_binaries(
.to_string_lossy()
.replace(&format!("-{target_triple}"), "");

if package_name.map_or(false, |n| n == &file_name) {
if package_name == Some(&file_name) {
return Err(anyhow::anyhow!(
"Cannot define a sidecar with the same name as the Cargo package name `{}`. Please change the sidecar name in the filesystem and the Tauri configuration.",
file_name
Expand Down
1 change: 1 addition & 0 deletions core/tauri-codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub enum CodegenConfigError {
///
/// If the passed path is relative, it should be relative to the current working directory of the
/// compiling crate.
#[allow(clippy::result_large_err)]
pub fn get_config(path: &Path) -> Result<(Config, PathBuf), CodegenConfigError> {
let path = if path.is_relative() {
let cwd = std::env::current_dir().map_err(CodegenConfigError::CurrentDir)?;
Expand Down
2 changes: 2 additions & 0 deletions core/tauri-utils/src/config/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

#![allow(clippy::result_large_err)]

use crate::config::Config;
use json_patch::merge;
use serde::de::DeserializeOwned;
Expand Down
1 change: 1 addition & 0 deletions core/tauri/src/api/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! Types and functions related to desktop notifications.
#[cfg(windows)]
#[allow(unused_imports)]
use std::path::MAIN_SEPARATOR as SEP;

/// The desktop notification definition.
Expand Down
2 changes: 1 addition & 1 deletion core/tests/app-updater/tests/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn build_app_v2(cwd: &Path, envs: Vec<(&str, &str)>, config: &ConfigV2, target:
#[cfg(target_os = "macos")]
command.args(["--bundles", target.name()]);

if config.bundle.create_updater_artifacts.map_or(false, |c| c) {
if config.bundle.create_updater_artifacts == Some(true) {
#[cfg(windows)]
command.args(["--bundles", "msi", "nsis"]);

Expand Down
3 changes: 1 addition & 2 deletions tooling/bundler/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
// Sign the sidecar binaries
for bin in settings.external_binaries() {
let path = bin?;
let skip =
std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").map_or(false, |v| v == "true");
let skip = std::env::var("TAURI_SKIP_SIDECAR_SIGNATURE_CHECK").is_ok_and(|v| v == "true");
if skip {
continue;
}
Expand Down
Loading

0 comments on commit e98cd59

Please sign in to comment.