Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit dff0dba

Browse files
committed
Derive Eq for Suggestion and related types
1 parent e03175e commit dff0dba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn get_suggestions_from_json<S: ::std::hash::BuildHasher>(
3737
Ok(result)
3838
}
3939

40-
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
40+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4141
pub struct LinePosition {
4242
pub line: usize,
4343
pub column: usize,
@@ -49,7 +49,7 @@ impl std::fmt::Display for LinePosition {
4949
}
5050
}
5151

52-
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
52+
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5353
pub struct LineRange {
5454
pub start: LinePosition,
5555
pub end: LinePosition,
@@ -61,21 +61,21 @@ impl std::fmt::Display for LineRange {
6161
}
6262
}
6363

64-
#[derive(Debug, Clone, Hash, PartialEq)]
64+
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
6565
/// An error/warning and possible solutions for fixing it
6666
pub struct Suggestion {
6767
pub message: String,
6868
pub snippets: Vec<Snippet>,
6969
pub solutions: Vec<Solution>,
7070
}
7171

72-
#[derive(Debug, Clone, Hash, PartialEq)]
72+
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
7373
pub struct Solution {
7474
pub message: String,
7575
pub replacements: Vec<Replacement>,
7676
}
7777

78-
#[derive(Debug, Clone, Hash, PartialEq)]
78+
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
7979
pub struct Snippet {
8080
pub file_name: String,
8181
pub line_range: LineRange,
@@ -86,7 +86,7 @@ pub struct Snippet {
8686
pub text: (String, String, String),
8787
}
8888

89-
#[derive(Debug, Clone, Hash, PartialEq)]
89+
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
9090
pub struct Replacement {
9191
pub snippet: Snippet,
9292
pub replacement: String,

0 commit comments

Comments
 (0)