Skip to content

Commit 0a44902

Browse files
authored
Merge pull request #12788 from gitbutlerapp/dp-expect-allow
Replace `#[allow(...)]` with `#[expect(...)]`
2 parents 34f5cd2 + b4b567b commit 0a44902

File tree

44 files changed

+50
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+50
-68
lines changed

crates/but-action/src/auto_commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl AutoCommitEvent {
5959
}
6060
}
6161

62-
#[allow(clippy::too_many_arguments)]
62+
#[expect(clippy::too_many_arguments)]
6363
pub(crate) fn auto_commit(
6464
project_id: ProjectHandleOrLegacyProjectId,
6565
repo: &gix::Repository,
@@ -135,7 +135,7 @@ pub(crate) fn auto_commit_simple(
135135
)
136136
}
137137

138-
#[allow(clippy::too_many_arguments)]
138+
#[expect(clippy::too_many_arguments)]
139139
fn apply_commit_changes(
140140
project_id: Option<ProjectHandleOrLegacyProjectId>,
141141
repo: &gix::Repository,

crates/but-action/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn branch_changes(
4040
branch_changes::branch_changes(ctx, llm, changes, model)
4141
}
4242

43-
#[allow(clippy::too_many_arguments)]
43+
#[expect(clippy::too_many_arguments)]
4444
pub fn auto_commit(
4545
project_id: ProjectHandleOrLegacyProjectId,
4646
repo: &gix::Repository,

crates/but-api-macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub fn but_api(attr: TokenStream, item: TokenStream) -> TokenStream {
297297
#input_fn
298298

299299
const _: () = {
300-
#[allow(dead_code)]
300+
#[expect(dead_code)]
301301
fn keep_json(_json: #json_ty) {}
302302
};
303303

crates/but-api/src/legacy/open.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! In place of commands.rs
22
use std::env;
33

4-
#[allow(unused_imports)]
54
use anyhow::anyhow;
65
use anyhow::{Context as _, Result, bail};
76
use but_api_macros::but_api;

crates/but-bot/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn bot(
2222
graph.start(&mut but_bot)
2323
}
2424

25-
#[allow(clippy::too_many_arguments)]
25+
#[expect(clippy::too_many_arguments)]
2626
pub fn forge_branch_chat(
2727
project_id: ProjectHandleOrLegacyProjectId,
2828
branch: String,

crates/but-claude/src/claude_transcript.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct AssistantMessage {
3030

3131
#[derive(Debug, Serialize, Deserialize)]
3232
#[serde(tag = "type")]
33-
#[allow(clippy::large_enum_variant)]
33+
#[expect(clippy::large_enum_variant)]
3434
pub enum Record {
3535
#[serde(rename = "summary")]
3636
Summary {

crates/but-claude/src/permissions/patterns.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ impl PathPattern {
148148
}
149149

150150
/// What kind of pattern to serialize as.
151-
#[allow(dead_code)]
152151
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
153152
pub enum PathPatternKind {
154153
HomeRelative,

crates/but-claude/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ async fn handle_ask_user_question(
15901590
/// `can_use_tool` callback to work correctly with the SDK's streaming mode.
15911591
/// 2. Performs file locking to track which files are being edited during the session,
15921592
/// preventing conflicts when Claude modifies files.
1593-
#[allow(unused_variables)]
1593+
#[expect(unused_variables)]
15941594
fn create_pretool_use_hook(
15951595
sync_ctx: ThreadSafeContext,
15961596
stack_id: but_core::ref_metadata::StackId,

crates/but-core/src/tree/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ fn to_additive_hunks(
485485
///
486486
/// Note that this algorithm is kind of the opposite of what people would expect if it's run where `to_additive_hunks()` works.
487487
/// But here we are… just making this work.
488-
#[allow(clippy::indexing_slicing)]
488+
#[expect(clippy::indexing_slicing)]
489489
fn to_additive_hunks_fallback(
490490
hunks_to_keep: impl IntoIterator<Item = HunkHeader>,
491491
worktree_hunks: &[HunkHeader],

crates/but-core/src/worktree/checkout/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Default for Lut {
2020
}
2121
}
2222

23-
#[allow(clippy::indexing_slicing)]
23+
#[expect(clippy::indexing_slicing)]
2424
impl Lut {
2525
/// Insert a node for each component in slash-separated `rela_path`.
2626
pub fn track_file(&mut self, rela_path: &BStr) {

0 commit comments

Comments
 (0)