Skip to content

Commit

Permalink
move impl FormattedEntry up
Browse files Browse the repository at this point in the history
  • Loading branch information
bebert64 committed Dec 11, 2023
1 parent 7c0dac9 commit 0b8483a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/taplo/src/formatter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,6 @@ struct FormattedEntry {
comment: Option<String>,
}

impl PartialEq for FormattedEntry {
fn eq(&self, other: &Self) -> bool {
self.cleaned_key().eq(other.cleaned_key())
}
}

impl Eq for FormattedEntry {}

impl FormattedEntry {
fn cleaned_key(&self) -> &str {
&self
Expand All @@ -380,6 +372,14 @@ impl FormattedEntry {
}
}

impl PartialEq for FormattedEntry {
fn eq(&self, other: &Self) -> bool {
self.cleaned_key().eq(other.cleaned_key())
}
}

impl Eq for FormattedEntry {}

impl PartialOrd for FormattedEntry {
fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
self.cleaned_key()
Expand Down

0 comments on commit 0b8483a

Please sign in to comment.