Skip to content

Commit e782c48

Browse files
Merge #732
732: Fix clippy error in webhook due to rust 1.91.0 r=curquiza a=kumarUjjawal # Pull Request ## Related issue Fixes #731 ## What does this PR do? - Fix clippy issue introduced in webhook module. ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Optimized internal implementation of default value handling to align with Rust best practices. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Kumar Ujjawal <[email protected]>
2 parents e90a3c2 + 0786d90 commit e782c48

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/webhooks.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,14 @@ impl WebhookCreate {
6666
}
6767
}
6868

69-
#[derive(Debug, Clone, PartialEq, Eq)]
69+
#[derive(Debug, Clone, PartialEq, Eq, Default)]
7070
enum HeadersUpdate {
71+
#[default]
7172
NotSet,
7273
Reset,
7374
Set(BTreeMap<String, Option<String>>),
7475
}
7576

76-
impl Default for HeadersUpdate {
77-
fn default() -> Self {
78-
Self::NotSet
79-
}
80-
}
81-
8277
/// Payload used to update or delete settings of an existing webhook.
8378
#[derive(Debug, Clone, Default, PartialEq, Eq)]
8479
pub struct WebhookUpdate {

0 commit comments

Comments
 (0)