Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/but-action/src/auto_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl AutoCommitEvent {
}
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub(crate) fn auto_commit(
project_id: ProjectHandleOrLegacyProjectId,
repo: &gix::Repository,
Expand Down Expand Up @@ -135,7 +135,7 @@ pub(crate) fn auto_commit_simple(
)
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn apply_commit_changes(
project_id: Option<ProjectHandleOrLegacyProjectId>,
repo: &gix::Repository,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-action/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub fn branch_changes(
branch_changes::branch_changes(ctx, llm, changes, model)
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub fn auto_commit(
project_id: ProjectHandleOrLegacyProjectId,
repo: &gix::Repository,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-api-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ pub fn but_api(attr: TokenStream, item: TokenStream) -> TokenStream {
#input_fn

const _: () = {
#[allow(dead_code)]
#[expect(dead_code)]
fn keep_json(_json: #json_ty) {}
};

Expand Down
1 change: 0 additions & 1 deletion crates/but-api/src/legacy/open.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! In place of commands.rs
use std::env;

#[allow(unused_imports)]
use anyhow::anyhow;
use anyhow::{Context as _, Result, bail};
use but_api_macros::but_api;
Expand Down
2 changes: 1 addition & 1 deletion crates/but-bot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn bot(
graph.start(&mut but_bot)
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
pub fn forge_branch_chat(
project_id: ProjectHandleOrLegacyProjectId,
branch: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-claude/src/claude_transcript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct AssistantMessage {

#[derive(Debug, Serialize, Deserialize)]
#[serde(tag = "type")]
#[allow(clippy::large_enum_variant)]
#[expect(clippy::large_enum_variant)]
pub enum Record {
#[serde(rename = "summary")]
Summary {
Expand Down
1 change: 0 additions & 1 deletion crates/but-claude/src/permissions/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ impl PathPattern {
}

/// What kind of pattern to serialize as.
#[allow(dead_code)]
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum PathPatternKind {
HomeRelative,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-claude/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ async fn handle_ask_user_question(
/// `can_use_tool` callback to work correctly with the SDK's streaming mode.
/// 2. Performs file locking to track which files are being edited during the session,
/// preventing conflicts when Claude modifies files.
#[allow(unused_variables)]
#[expect(unused_variables)]
fn create_pretool_use_hook(
sync_ctx: ThreadSafeContext,
stack_id: but_core::ref_metadata::StackId,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-core/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ fn to_additive_hunks(
///
/// Note that this algorithm is kind of the opposite of what people would expect if it's run where `to_additive_hunks()` works.
/// But here we are… just making this work.
#[allow(clippy::indexing_slicing)]
#[expect(clippy::indexing_slicing)]
fn to_additive_hunks_fallback(
hunks_to_keep: impl IntoIterator<Item = HunkHeader>,
worktree_hunks: &[HunkHeader],
Expand Down
2 changes: 1 addition & 1 deletion crates/but-core/src/worktree/checkout/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl Default for Lut {
}
}

#[allow(clippy::indexing_slicing)]
#[expect(clippy::indexing_slicing)]
impl Lut {
/// Insert a node for each component in slash-separated `rela_path`.
pub fn track_file(&mut self, rela_path: &BStr) {
Expand Down
11 changes: 4 additions & 7 deletions crates/but-ctx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl Context {
/// # IMPORTANT
/// * if the workspace was changed, write the new workspace back into `&mut ws`.
#[instrument(name = "Context::workspace_mut_and_db_mut", level = "debug", skip_all)]
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
pub fn workspace_mut_and_db_mut(
&mut self,
) -> anyhow::Result<(
Expand Down Expand Up @@ -442,7 +442,7 @@ impl Context {
/// * if the workspace was changed, write it back into `&mut ws`.
/// * Keep the guard alive like `let (_guard, …) = …`!
#[instrument(name = "Context::workspace_and_db_mut", level = "debug", skip_all)]
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
pub fn workspace_and_db_mut(
&mut self,
) -> anyhow::Result<(
Expand All @@ -469,7 +469,6 @@ impl Context {
level = "debug",
skip_all
)]
#[allow(clippy::type_complexity)]
pub fn workspace_and_db_mut_with_perm(
&mut self,
_perm: &RepoShared,
Expand Down Expand Up @@ -501,7 +500,7 @@ impl Context {
/// * if the workspace was changed, write it back into `&mut ws`.
/// * Keep the guard alive like `let (_guard, …) = …`!
#[instrument(name = "Context::workspace_mut_from_head", level = "debug", skip_all)]
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
pub fn workspace_mut_and_db(
&mut self,
) -> anyhow::Result<(
Expand All @@ -526,7 +525,6 @@ impl Context {
level = "debug",
skip_all
)]
#[allow(clippy::type_complexity)]
pub fn workspace_mut_and_db_with_perm(
&self,
_perm: &RepoExclusive,
Expand Down Expand Up @@ -558,7 +556,7 @@ impl Context {
/// # IMPORTANT
/// * Keep the guard alive like `let (_guard, …) = …`!
#[instrument(name = "Context::workspace_from_head", level = "debug", skip_all)]
#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
pub fn workspace_and_db(
&self,
) -> anyhow::Result<(
Expand All @@ -580,7 +578,6 @@ impl Context {
level = "debug",
skip_all
)]
#[allow(clippy::type_complexity)]
pub fn workspace_and_db_with_perm(
&self,
_perm: &RepoShared,
Expand Down
2 changes: 0 additions & 2 deletions crates/but-github/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ pub enum GitHubAccount {
username: String,
access_token: Sensitive<String>,
},
#[allow(dead_code)]
Pat {
username: String,
access_token: Sensitive<String>,
},
#[allow(dead_code)]
Enterprise {
username: String,
host: String,
Expand Down
2 changes: 0 additions & 2 deletions crates/but-gitlab/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ impl std::fmt::Display for GitlabAccountIdentifier {
}

pub enum GitLabAccount {
#[allow(dead_code)]
Pat {
username: String,
access_token: Sensitive<String>,
},
#[allow(dead_code)]
SelfHosted {
username: String,
host: String,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-hunk-dependency/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl HunkDependencies {
fn hunk_dependency_diffs_schema(generate: &mut schemars::SchemaGenerator) -> schemars::Schema {
/// A mirror of the tuple `(String, DiffHunk, Vec<HunkLock>)` for schema generation.
#[derive(schemars::JsonSchema)]
#[allow(dead_code)]
#[expect(dead_code)]
struct HunkDependencyDiff(String, DiffHunk, Vec<HunkLock>);

generate.subschema_for::<Vec<HunkDependencyDiff>>()
Expand Down
2 changes: 1 addition & 1 deletion crates/but-hunk-dependency/tests/hunk_dependency/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ mod util {

pub struct TestContext {
// TODO: remove this once this has been ported to 'modern' code, i.e. uses `but-graph::projection::Workspace`.
#[allow(dead_code)]
#[expect(dead_code)]
pub tmpdir: Option<tempfile::TempDir>,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ mod util {
pub ctx: Context,
// TODO: make non-optional
// TODO: remove once we don't need vb.toml anymore which is produced on the fly.
#[allow(dead_code)]
#[expect(dead_code)]
tmpdir: Option<tempfile::TempDir>,
}
}
Expand Down
11 changes: 5 additions & 6 deletions crates/but-link/tests/claiming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ use std::time::Duration;
use rusqlite::{Connection, params};
use serde_json::json;

#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/services/acquire.rs"]
mod acquire_impl;
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/cli.rs"]
mod cli;
#[allow(dead_code, unused_imports)]
#[expect(dead_code, unused_imports)]
#[path = "../src/db/mod.rs"]
mod db;
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/payloads.rs"]
mod payloads;
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/repo.rs"]
mod repo;
#[allow(dead_code)]
#[path = "../src/text.rs"]
mod text;

Expand Down
2 changes: 1 addition & 1 deletion crates/but-link/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::time::Duration;

use clap::{CommandFactory, Parser, error::ErrorKind};

#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/cli.rs"]
mod cli_impl;

Expand Down
5 changes: 2 additions & 3 deletions crates/but-link/tests/db.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
use rusqlite::{Connection, params};
use serde_json::{Value, json};

#[allow(dead_code, unused_imports)]
#[expect(dead_code, unused_imports)]
#[path = "../src/db/mod.rs"]
mod db;
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/payloads.rs"]
mod payloads;
#[allow(dead_code)]
#[path = "../src/text.rs"]
mod text;

Expand Down
2 changes: 0 additions & 2 deletions crates/but-link/tests/payloads.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#[allow(dead_code)]
#[path = "../src/payloads.rs"]
mod payloads_impl;
#[allow(dead_code)]
#[path = "../src/text.rs"]
mod text;

Expand Down
4 changes: 2 additions & 2 deletions crates/but-link/tests/repo.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/cli.rs"]
mod cli;
#[allow(dead_code)]
#[expect(dead_code)]
#[path = "../src/repo.rs"]
mod repo_impl;

Expand Down
2 changes: 1 addition & 1 deletion crates/but-meta/src/legacy/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ fn snapshot_to_legacy(snapshot: &VirtualBranchesSnapshot) -> anyhow::Result<Virt
})
}

#[allow(clippy::large_enum_variant)]
#[expect(clippy::large_enum_variant)]
enum TomlInfo {
Missing,
Parsed(ParsedToml),
Expand Down
2 changes: 1 addition & 1 deletion crates/but-meta/src/virtual_branches_legacy_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ mod stack {
#[derive(Deserialize)]
enum CommitOrChangeIdHelper {
CommitId(String),
#[allow(dead_code)]
#[expect(dead_code)]
ChangeId(String),
}

Expand Down
2 changes: 1 addition & 1 deletion crates/but-project-handle/src/project_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ mod tests {
use std::os::unix::ffi::OsStrExt as _;

let bytes = b"/tmp/\xF1\xF2\xF3\xC0\xC1\xC2";
#[allow(invalid_from_utf8)]
#[expect(invalid_from_utf8)]
let res = std::str::from_utf8(bytes);
assert!(res.is_err(), "this is illformed UTF8");
let encoded = encode(bytes);
Expand Down
2 changes: 1 addition & 1 deletion crates/but-rebase/src/graph_rebase/cherry_pick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ fn commit_from_unconflicted_tree<'repo>(
.attach(repo))
}

#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn commit_from_conflicted_tree<'repo>(
parents: &[gix::ObjectId],
mut to_rebase: but_core::Commit<'repo>,
Expand Down
1 change: 0 additions & 1 deletion crates/but-rebase/src/graph_rebase/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ pub struct Editor {
}

/// Represents a successful rebase, and any valid, but potentially conflicting scenarios it had.
#[allow(unused)]
#[derive(Debug, Clone)]
pub struct SuccessfulRebase {
pub(crate) repo: gix::Repository,
Expand Down
6 changes: 3 additions & 3 deletions crates/but-schemars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ pub fn bstring_bytes_opt(generate: &mut schemars::SchemaGenerator) -> schemars::
}

#[derive(schemars::JsonSchema)]
#[allow(dead_code)]
#[expect(dead_code)]
struct GixTime {
seconds: i64,
offset: i32,
Expand All @@ -243,7 +243,7 @@ pub fn gix_time_opt(generate: &mut schemars::SchemaGenerator) -> schemars::Schem

#[derive(schemars::JsonSchema)]
#[schemars(rename = "EntryKind")]
#[allow(dead_code)]
#[expect(dead_code)]
enum EntryKindSchema {
Tree,
Blob,
Expand All @@ -269,7 +269,7 @@ pub fn entry_kind(generate: &mut schemars::SchemaGenerator) -> schemars::Schema
/// Schema for `serde_error::Error` which serializes as `{description: string, source?: Error | null}`.
#[derive(schemars::JsonSchema)]
#[schemars(rename = "SerdeError")]
#[allow(dead_code)]
#[expect(dead_code)]
struct SerdeErrorSchema {
description: String,
source: Option<Box<SerdeErrorSchema>>,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-workspace/src/branch/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub struct Options {
pub new_stack_id: Option<fn(&gix::refs::FullNameRef) -> StackId>,
}

#[allow(clippy::indexing_slicing)]
#[expect(clippy::indexing_slicing)]
pub(crate) mod function {
use std::borrow::Cow;

Expand Down
2 changes: 1 addition & 1 deletion crates/but-workspace/src/commit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub mod merge {
tips.into_iter().map(|t| (I::Merge, t)).collect();

let mut ran_merge_trials_loop_safety = false;
#[allow(clippy::indexing_slicing)]
#[expect(clippy::indexing_slicing)]
'retry_loop: loop {
let mut prev_base_sidx = None;
let mut merge_tree_id = None;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub enum ChangesSource {
id: gix::ObjectId,
},
/// Changes between two arbitrary trees
#[allow(dead_code)]
Tree {
/// The "after" tree ID
after_id: gix::ObjectId,
Expand Down
2 changes: 1 addition & 1 deletion crates/but-worktrees/tests/worktree/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod util {
})
}

#[allow(unused)]
#[expect(unused)]
pub struct TestContext {
pub ctx: Context,
pub handle: VirtualBranchesHandle,
Expand Down
2 changes: 1 addition & 1 deletion crates/but/src/command/legacy/absorb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub(crate) fn handle(
}

/// Absorb a single file into the appropriate commit
#[allow(clippy::too_many_arguments)]
#[expect(clippy::too_many_arguments)]
fn absorb_assignments(
absorption_plan: Vec<CommitAbsorption>,
guard: &mut RepoExclusiveGuard,
Expand Down
Loading
Loading