Skip to content

Commit 591516a

Browse files
committed
Add Facet derive to AnnoKey
1 parent 607d511 commit 591516a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ version = "3.8.3"
1414
binary-layout = "4.0.1"
1515
bincode = "1.2"
1616
clru = "0.6.1"
17+
facet = "0.28.0"
1718
itertools = "0.10"
1819
lazy_static = "1.4"
1920
log = "0.4"

core/src/types.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use facet::Facet;
12
use num_traits::{Bounded, FromPrimitive, Num, ToPrimitive};
23
use serde::Serialize;
34
use serde::de::DeserializeOwned;
@@ -22,7 +23,9 @@ use std::result::Result as StdResult;
2223
pub type NodeID = u64;
2324

2425
/// The fully qualified name of an annotation.
25-
#[derive(Serialize, Deserialize, Default, Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Hash)]
26+
#[derive(
27+
Facet, Serialize, Deserialize, Default, Eq, PartialEq, PartialOrd, Ord, Clone, Debug, Hash,
28+
)]
2629
pub struct AnnoKey {
2730
/// Name of the annotation.
2831
pub name: String,

0 commit comments

Comments
 (0)