Skip to content

Commit 8e9bb59

Browse files
author
ComputelessComputer
committed
fix clippy warnings for cross-platform build
1 parent a7e9dde commit 8e9bb59

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ tauri-plugin-updater = "2"
3232
[target."cfg(target_os = \"macos\")".dependencies]
3333
objc = "0.2"
3434

35+
[lints.rust]
36+
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(feature, values("cargo-clippy"))'] }

src-tauri/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ use tauri_plugin_fs::FsExt;
1111
use tauri_plugin_updater::UpdaterExt;
1212

1313
#[tauri::command]
14-
fn set_window_opacity(app: AppHandle, opacity: f64) -> Result<(), String> {
14+
fn set_window_opacity(_app: AppHandle, _opacity: f64) -> Result<(), String> {
1515
#[cfg(target_os = "macos")]
1616
{
17-
let window = app.get_webview_window("main").ok_or("Window not found")?;
17+
let window = _app.get_webview_window("main").ok_or("Window not found")?;
1818
let ns_win = window.ns_window().map_err(|e| e.to_string())?;
1919
unsafe {
2020
let _: () =
21-
objc::msg_send![ns_win as *mut objc::runtime::Object, setAlphaValue: opacity];
21+
objc::msg_send![ns_win as *mut objc::runtime::Object, setAlphaValue: _opacity];
2222
}
2323
}
2424
Ok(())

0 commit comments

Comments
 (0)