Skip to content

Commit 955e82b

Browse files
committed
Convert all usese of allow to expect and fix those that aren't relevant anymore.
1 parent ce73858 commit 955e82b

File tree

62 files changed

+65
-376
lines changed

Some content is hidden

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

62 files changed

+65
-376
lines changed

crates/but-action/src/generate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use schemars::{JsonSchema, schema_for};
1010

1111
use crate::OpenAiProvider;
1212

13-
#[allow(dead_code)]
13+
#[expect(dead_code)]
1414
pub fn commit_message_blocking(
1515
openai: &OpenAiProvider,
1616
external_summary: &str,

crates/but-action/src/grouping.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub enum BranchSuggestion {
1515
}
1616

1717
impl BranchSuggestion {
18-
#[allow(dead_code)]
18+
#[expect(dead_code)]
1919
pub fn name(&self) -> String {
2020
match self {
2121
BranchSuggestion::New(name) => name.clone(),
@@ -63,7 +63,7 @@ pub struct Grouping {
6363
pub groups: Vec<Group>,
6464
}
6565

66-
#[allow(dead_code)]
66+
#[expect(dead_code)]
6767
pub fn group(openai: &OpenAiProvider, project_status: &ProjectStatus) -> anyhow::Result<Grouping> {
6868
let system_message ="
6969
You are an expert in grouping file changes into logical units for version control.

crates/but-action/src/openai.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use schemars::{JsonSchema, schema_for};
1919
use serde::de::DeserializeOwned;
2020
use tokio::sync::Mutex;
2121

22-
#[allow(unused)]
2322
#[derive(Debug, Clone, serde::Serialize, strum::Display)]
2423
pub enum CredentialsKind {
2524
EnvVarOpenAiKey,
@@ -116,7 +115,6 @@ impl OpenAiProvider {
116115
}
117116
}
118117

119-
#[allow(dead_code)]
120118
pub fn structured_output_blocking<
121119
T: serde::Serialize + DeserializeOwned + JsonSchema + std::marker::Send + 'static,
122120
>(
@@ -144,7 +142,6 @@ pub fn structured_output_blocking<
144142
.unwrap()
145143
}
146144

147-
#[allow(dead_code)]
148145
pub async fn structured_output<T: serde::Serialize + DeserializeOwned + JsonSchema>(
149146
client: &Client<OpenAIConfig>,
150147
messages: Vec<ChatCompletionRequestMessage>,
@@ -177,7 +174,6 @@ pub async fn structured_output<T: serde::Serialize + DeserializeOwned + JsonSche
177174
Ok(None)
178175
}
179176

180-
#[allow(dead_code)]
181177
pub fn tool_calling_blocking(
182178
client: &OpenAiProvider,
183179
messages: Vec<ChatCompletionRequestMessage>,
@@ -197,7 +193,6 @@ pub fn tool_calling_blocking(
197193
.unwrap()
198194
}
199195

200-
#[allow(dead_code)]
201196
pub async fn tool_calling(
202197
client: &Client<OpenAIConfig>,
203198
messages: Vec<ChatCompletionRequestMessage>,

crates/but-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ pub struct WorktreeChanges {
350350
/// the *dominant* change to display. Note that it can stack with a content change,
351351
/// but *should not only in case of a `TypeChange*`*.
352352
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
353-
#[allow(missing_docs)]
353+
#[expect(missing_docs)]
354354
pub enum ModeFlags {
355355
ExecutableBitAdded,
356356
ExecutableBitRemoved,

crates/but-core/src/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub mod git {
2121
/// See [`GitConfigSettings`](crate::GitConfigSettings) for the docs.
2222
#[derive(Debug, PartialEq, Clone, Default, serde::Serialize, serde::Deserialize)]
2323
#[serde(rename_all = "camelCase")]
24-
#[allow(missing_docs)]
24+
#[expect(missing_docs)]
2525
pub struct GitConfigSettings {
2626
#[serde(rename = "signCommits")]
2727
pub gitbutler_sign_commits: Option<bool>,

crates/but-core/src/ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub struct ChangeState {
249249
}
250250

251251
#[derive(Debug, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
252-
#[allow(missing_docs)]
252+
#[expect(missing_docs)]
253253
pub enum ModeFlags {
254254
ExecutableBitAdded,
255255
ExecutableBitRemoved,

crates/but-graph/src/init/post.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ impl Graph {
3535
/// Now that the graph is complete, perform additional structural improvements with
3636
/// the requirement of them to be computationally cheap.
3737
#[instrument(skip(self, meta, repo, refs_by_id), err(Debug))]
38-
#[allow(clippy::too_many_arguments)]
3938
pub(super) fn post_processed<T: RefMetadata>(
4039
mut self,
4140
meta: &OverlayMetadata<'_, T>,

crates/but-graph/src/init/walk.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ pub fn find(
596596
/// This means we process all workspaces if we aren't currently and clearly looking at a workspace.
597597
///
598598
/// Also prune all non-standard workspaces early, or those that don't have a tip.
599-
#[allow(clippy::type_complexity)]
599+
#[expect(clippy::type_complexity)]
600600
pub fn obtain_workspace_infos<T: RefMetadata>(
601601
repo: &OverlayRepo<'_>,
602602
maybe_ref_name: Option<&gix::refs::FullNameRef>,
@@ -695,7 +695,7 @@ pub fn propagate_flags_downward(
695695
/// If a remote tracking branch is in `target_refs`, we assume it was already scheduled and won't schedule it again.
696696
/// Note that remotes fully obey the limit.
697697
/// If the created remote segment belongs to the segment of `local_tracking_sidx`, return its Segment index along with its name.
698-
#[allow(clippy::too_many_arguments)]
698+
#[expect(clippy::too_many_arguments)]
699699
pub fn try_queue_remote_tracking_branches<T: RefMetadata>(
700700
repo: &OverlayRepo<'_>,
701701
refs: &[gix::refs::FullName],

crates/but-graph/tests/graph/init/utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub fn read_only_in_memory_scenario_named(
4040
}
4141

4242
pub enum StackState {
43-
#[allow(dead_code)]
4443
InWorkspace,
4544
Inactive,
4645
}

crates/but-hunk-dependency/src/ranges/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct WorkspaceRanges {
2323
/// An error that can say what went wrong when computing the hunk ranges for a commit in a stack at a given path.
2424
#[derive(Debug, Clone, Serialize)]
2525
#[serde(rename_all = "camelCase")]
26-
#[allow(missing_docs)]
26+
#[expect(missing_docs)]
2727
pub struct CalculationError {
2828
pub error_message: String,
2929
pub stack_id: StackId,

0 commit comments

Comments
 (0)