Skip to content

Commit 4d52864

Browse files
committed
f Move StorableObject definition up
1 parent 7a94297 commit 4d52864

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/data_store.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ use std::collections::HashMap;
1616
use std::ops::Deref;
1717
use std::sync::{Arc, Mutex};
1818

19-
pub(crate) trait StorableObjectId: std::hash::Hash + PartialEq + Eq {
20-
fn encode_to_hex_str(&self) -> String;
21-
}
22-
23-
pub(crate) trait StorableObjectUpdate<SO: StorableObject> {
24-
fn id(&self) -> SO::Id;
25-
}
26-
2719
pub(crate) trait StorableObject: Clone + Readable + Writeable {
2820
type Id: StorableObjectId;
2921
type Update: StorableObjectUpdate<Self>;
@@ -33,6 +25,14 @@ pub(crate) trait StorableObject: Clone + Readable + Writeable {
3325
fn into_update(&self) -> Self::Update;
3426
}
3527

28+
pub(crate) trait StorableObjectId: std::hash::Hash + PartialEq + Eq {
29+
fn encode_to_hex_str(&self) -> String;
30+
}
31+
32+
pub(crate) trait StorableObjectUpdate<SO: StorableObject> {
33+
fn id(&self) -> SO::Id;
34+
}
35+
3636
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
3737
pub(crate) enum DataStoreUpdateResult {
3838
Updated,

0 commit comments

Comments
 (0)