Skip to content

Commit d33ae64

Browse files
committed
Replace allow attributes with expect
1 parent 946f89c commit d33ae64

15 files changed

Lines changed: 13 additions & 19 deletions

File tree

gravel-core/src/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl QueryEngine {
102102
}
103103

104104
/// Queries providers; aggregates, scores and orders [`ArcDynHit`]s.
105-
#[allow(single_use_lifetimes)]
105+
#[expect(single_use_lifetimes)]
106106
fn query_all<'a>(providers: impl Iterator<Item = &'a ProviderInfo>, query: &str) -> QueryResult {
107107
let hits = providers.flat_map(|p| query_one(p, query).hits).collect_vec();
108108

gravel-ffi/src/hit.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ pub struct SimpleHit {
114114
pub title: RString,
115115
pub subtitle: RString,
116116
pub override_score: ROption<u32>,
117-
118-
#[allow(clippy::type_complexity)]
119117
pub action: SimpleHitAction,
120118
pub secondary_action: Option<SimpleHitAction>,
121119
}

gravel-ffi/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
55
// the abi_stable derives/macros generate code that doesn't gel with these lints
66
// since you can't just slap these on generated code they're disabled for the whole crate
7-
#![allow(
8-
clippy::empty_docs,
9-
clippy::needless_lifetimes,
7+
#![expect(
108
clippy::used_underscore_binding,
119
non_local_definitions,
1210
single_use_lifetimes,

gravel-ffi/src/prefix.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ pub struct PluginLib {
1111
pub plugin: extern "C" fn(log_target: BoxDynLogTarget) -> RVec<PluginDefinition>,
1212
}
1313

14-
#[allow(clippy::use_self)]
1514
impl RootModule for PluginLibRef {
1615
declare_root_module_statics! {PluginLibRef}
1716

gravel-ffi/tests/cache_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Really a unit test, but can't be in-module due to
22
//! circular dependency gravel-ffi <-> gravel-test-utils
33
4-
#![allow(unused_crate_dependencies)]
4+
#![expect(unused_crate_dependencies)]
55

66
use gravel_ffi::{ArcDynHit, HitCache, StaticHitCache};
77
use gravel_test_utils::{data::TestHit, util::slices_equal};

gravel-ffi/tests/smoke_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(unused_crate_dependencies, clippy::missing_panics_doc)]
1+
#![expect(unused_crate_dependencies, clippy::missing_panics_doc)]
22

33
use abi_stable::std_types::{ROption, RSlice, RString};
44
use abi_stable::traits::IntoReprC;

gravel-provider-kill/src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub enum KillError {
3434
}
3535

3636
// Needs to be Result to maintain same signature as linux implementation
37-
#[allow(clippy::unnecessary_wraps)]
37+
#[expect(clippy::unnecessary_wraps)]
3838
pub fn query() -> Result<impl Iterator<Item = SimpleHit>> {
3939
// TODO: sysinfo crate loads a lot of unnecessary data into memory,
4040
// replace with native calls (or a crate that does streaming)

gravel-provider-program/src/linux.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pub fn get_program(path: &Path) -> Option<SimpleHit> {
3333
fn run_program(desktop_file: &str, context: RefDynHitActionContext<'_>) {
3434
log::debug!("starting application '{desktop_file}'");
3535

36-
#[allow(clippy::zombie_processes)]
36+
#[expect(clippy::zombie_processes)]
3737
Command::new("gtk-launch")
3838
.arg(desktop_file)
3939
// explicitly prevent stream inheritance

gravel-provider-program/src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fn parent_dir(path: RStr<'_>) -> Option<&Path> {
4848
fn run_explorer(link_path: impl AsRef<OsStr> + Debug, context: RefDynHitActionContext<'_>) {
4949
log::debug!("starting explorer with {link_path:?}");
5050

51-
#[allow(clippy::zombie_processes)]
51+
#[expect(clippy::zombie_processes)]
5252
Command::new("explorer")
5353
.arg(link_path)
5454
.spawn()

gravel-provider-system/src/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Needs to be Result to maintain same signature as linux implementation
2-
#![allow(clippy::unnecessary_wraps)]
2+
#![expect(clippy::unnecessary_wraps)]
33

44
use anyhow::Result;
55
use winapi::um::{powrprof, winuser};

0 commit comments

Comments
 (0)