File tree 5 files changed +899
-12
lines changed
5 files changed +899
-12
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ serde_bytes = "0.11"
34
34
serde_cbor = " 0.11"
35
35
serde_ipld_dagcbor = " 0.6"
36
36
serde_json = { version = " 1" , features = [" raw_value" ] }
37
+ sha2 = " 0.10"
37
38
signal-hook = { version = " 0.3" , features = [" extended-siginfo" ] }
38
39
sled = { version = " 0.34" , features = [" compression" ] }
39
40
thingbuf = " 0.1"
Original file line number Diff line number Diff line change 1
1
use std:: borrow:: Cow ;
2
+ use std:: cmp:: Ordering ;
2
3
use std:: convert:: Infallible ;
3
4
use std:: io:: Write ;
4
5
use std:: { fmt, io} ;
@@ -76,7 +77,38 @@ pub enum SubscribeReposCommitOperation {
76
77
Delete { path : String , prev_data : Option < Cid > } ,
77
78
}
78
79
80
+ impl PartialEq for SubscribeReposCommitOperation {
81
+ #[ inline]
82
+ fn eq ( & self , other : & Self ) -> bool {
83
+ self . path ( ) . eq ( other. path ( ) )
84
+ }
85
+ }
86
+
87
+ impl Eq for SubscribeReposCommitOperation { }
88
+
89
+ impl PartialOrd for SubscribeReposCommitOperation {
90
+ #[ inline]
91
+ fn partial_cmp ( & self , other : & Self ) -> Option < Ordering > {
92
+ Some ( self . cmp ( other) )
93
+ }
94
+ }
95
+
96
+ impl Ord for SubscribeReposCommitOperation {
97
+ #[ inline]
98
+ fn cmp ( & self , other : & Self ) -> Ordering {
99
+ self . path ( ) . cmp ( other. path ( ) )
100
+ }
101
+ }
102
+
79
103
impl SubscribeReposCommitOperation {
104
+ fn path ( & self ) -> & String {
105
+ match self {
106
+ Self :: Create { path, .. } => path,
107
+ Self :: Update { path, .. } => path,
108
+ Self :: Delete { path, .. } => path,
109
+ }
110
+ }
111
+
80
112
pub const fn is_valid ( & self ) -> bool {
81
113
match self {
82
114
Self :: Create { .. } => true ,
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ impl Resolver {
166
166
let ( req, hostname) = if let Some ( hostname) = hostname {
167
167
( self . client . get ( format ! ( "https://{hostname}/{DOC_PATH}" ) ) , Some ( hostname. to_owned ( ) ) )
168
168
} else if let Some ( after) = self . after . take ( ) {
169
- tracing:: debug !( "fetching after: {after}" ) ;
169
+ tracing:: trace !( "fetching after: {after}" ) ;
170
170
self . last = Instant :: now ( ) ;
171
171
( self . client . get ( format ! ( "{PLC_URL}={after}" ) ) , None )
172
172
} else {
You can’t perform that action at this time.
0 commit comments