File tree Expand file tree Collapse file tree 2 files changed +18
-262
lines changed Expand file tree Collapse file tree 2 files changed +18
-262
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,7 @@ use serde::{Deserialize, Serialize};
7
7
// This is a helper struct used to properly deserialize referential
8
8
// JSON comments which are single continuous String, into a vec of
9
9
// content slices.
10
- #[ derive( Debug , Clone ) ]
11
- #[ cfg_attr( not( feature = "spans" ) , derive( PartialEq , Eq ) ) ]
10
+ #[ derive( Debug , Clone , PartialEq ) ]
12
11
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
13
12
#[ cfg_attr( feature = "serde" , serde( untagged) ) ]
14
13
pub enum CommentDef < S > {
@@ -24,34 +23,6 @@ pub enum CommentDef<S> {
24
23
} ,
25
24
}
26
25
27
- #[ cfg( feature = "spans" ) ]
28
- impl < S : Eq > Eq for CommentDef < S > { }
29
-
30
- #[ cfg( feature = "spans" ) ]
31
- impl < S : PartialEq > PartialEq for CommentDef < S > {
32
- fn eq ( & self , other : & Self ) -> bool {
33
- match ( self , other) {
34
- (
35
- Self :: Single {
36
- content : l_content, ..
37
- } ,
38
- Self :: Single {
39
- content : r_content, ..
40
- } ,
41
- ) => l_content == r_content,
42
- (
43
- Self :: Multi {
44
- content : l_content, ..
45
- } ,
46
- Self :: Multi {
47
- content : r_content, ..
48
- } ,
49
- ) => l_content == r_content,
50
- _ => false ,
51
- }
52
- }
53
- }
54
-
55
26
impl < S > From < CommentDef < S > > for Comment < S > {
56
27
fn from ( input : CommentDef < S > ) -> Self {
57
28
match input {
You can’t perform that action at this time.
0 commit comments