Skip to content

Commit 583c0fb

Browse files
committed
fix(ci): correct clippy allow attribute placement in lib.rs
Previous commit placed #[allow] attribute in the middle of a method chain, which is invalid Rust syntax. Fixed by assigning the builder to a variable first, then applying the attribute to the .run() call. Error was: error: expected ';', found '#' --> src/lib.rs:97:11
1 parent 7510737 commit 583c0fb

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src-tauri/src/lib.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::error::AppError;
1616
pub fn run() -> Result<(), AppError> {
1717
let _ = env_logger::try_init();
1818

19-
tauri::Builder::default()
19+
let builder = tauri::Builder::default()
2020
.plugin(tauri_plugin_dialog::init())
2121
.plugin(tauri_plugin_fs::init())
2222
.plugin(tauri_plugin_opener::init())
@@ -94,11 +94,12 @@ pub fn run() -> Result<(), AppError> {
9494
app_handle.manage(app_state);
9595

9696
Ok(())
97-
})
98-
// tauri::generate_context!() macro expansion contains .unwrap() calls.
99-
// This is part of Tauri's code generation and cannot be avoided.
100-
#[allow(clippy::disallowed_methods)]
101-
.run(tauri::generate_context!())?;
97+
});
98+
99+
// tauri::generate_context!() macro expansion contains .unwrap() calls.
100+
// This is part of Tauri's code generation and cannot be avoided.
101+
#[allow(clippy::disallowed_methods)]
102+
builder.run(tauri::generate_context!())?;
102103

103104
Ok(())
104105
}

0 commit comments

Comments
 (0)