Skip to content

Commit 5b16e30

Browse files
committed
fix: documents docs compare
1 parent cb5d931 commit 5b16e30

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libschema/src/symbol/base.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use spdcp::Comment;
55

66
use crate::metadata::Metadata;
77

8-
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
8+
#[derive(Debug, Clone, Serialize, Deserialize)]
99
#[serde(rename_all = "camelCase")]
1010
pub struct Documentation {
1111
#[serde(default)]
@@ -35,6 +35,13 @@ impl ShlAssign for Documentation {
3535
}
3636
}
3737

38+
impl PartialEq for Documentation {
39+
fn eq(&self, other: &Self) -> bool {
40+
// Only compare against the docs
41+
self.docs == other.docs
42+
}
43+
}
44+
3845
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
3946
#[serde(rename_all = "camelCase")]
4047
/// Base symbol declaration

0 commit comments

Comments
 (0)