Skip to content

Commit

Permalink
chore: Derive eq (#448)
Browse files Browse the repository at this point in the history
Addresses a clippy lint, derive `Eq` since these types derive `PartialEq`.
  • Loading branch information
afnanenayet authored Oct 3, 2022
1 parent 680f940 commit 3ec52c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ pub type RichHunk<'a> = DocumentType<Hunk<'a>>;
/// The hunks that correspond to a document
///
/// This type implements a helper builder function that can take
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Hunks<'a>(pub Vec<Hunk<'a>>);

#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RichHunks<'a>(pub Vec<RichHunk<'a>>);

/// A builder struct for [`RichHunks`].
Expand Down
2 changes: 1 addition & 1 deletion src/formatting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl Default for DiffWriter {
}

/// User supplied parameters that are required to display a diff
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DisplayParameters<'a> {
/// The hunks constituting the diff.
pub hunks: RichHunks<'a>,
Expand Down

0 comments on commit 3ec52c0

Please # to comment.