Skip to content

Commit

Permalink
Re-add clippy annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
mystor committed Sep 12, 2024
1 parent 9d787a1 commit 27cb4ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,11 @@ impl AuditEntry {

/// Implement PartialOrd manually because the order we want for sorting is
/// different than the order we want for serialization.
///
/// Strictly speaking Ord and PartialOrd implementations are supposed to agree,
/// and clippy recently started complaining about this. We should consider whether
/// there's another solution to this problem.
#[allow(clippy::non_canonical_partial_ord_impl)]
impl cmp::PartialOrd for AuditEntry {
fn partial_cmp<'a>(&'a self, other: &'a AuditEntry) -> Option<cmp::Ordering> {
let tuple = |x: &'a AuditEntry| (&x.kind, &x.criteria, &x.who, &x.notes);
Expand Down

0 comments on commit 27cb4ca

Please sign in to comment.