Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Jan 15, 2024
1 parent 62bde42 commit 5e265aa
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/compiler/grammar/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use super::{
Capability, Invalid,
};

#[allow(clippy::enum_variant_names)]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub(crate) enum Test {
True,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ mod tests {
"sieve_ext_list_item" => {
lists
.entry(value)
.or_insert_with(AHashSet::new)
.or_default()
.insert(params.next().expect("list item value"));
}
"sieve_duplicated_id" => {
Expand Down
1 change: 1 addition & 0 deletions src/runtime/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ impl PartialEq for Variable {

impl Eq for Variable {}

#[allow(clippy::non_canonical_partial_ord_impl)]
impl PartialOrd for Variable {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
match (self, other) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/tests/test_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl TestBody {
ctx.find_nested_parts(&ctx.message, &ct_filter, &mut |part, raw_message| {
let text = match (&self.body_transform, &part.body) {
(BodyTransform::Content(_), PartType::Message(message)) => {
if let Some(part) = message.parts.get(0) {
if let Some(part) = message.parts.first() {
String::from_utf8_lossy(
raw_message
.get(part.raw_header_offset()..part.raw_body_offset())
Expand Down

0 comments on commit 5e265aa

Please sign in to comment.