@@ -161,14 +161,10 @@ pub(crate) mod tests;
161161/// describe the same database state. Callers that learn trusted canonical roots from another source
162162/// can cache these targets and use [`TargetMatcher`] to find a target whose root has been trusted
163163/// before passing it to [`sync`].
164- pub trait CurrentResolver : Send + Sync + Clone + ' static {
165- /// Merkle family used by the database.
166- type Family : Graftable ;
167- /// Root digest type.
168- type Digest : Digest ;
169- /// Error type returned by the resolver.
170- type Error : std:: error:: Error + Send + ' static ;
171-
164+ pub trait CurrentResolver : qmdb_sync:: Resolver
165+ where
166+ Self :: Family : Graftable ,
167+ {
172168 /// Fetch the latest full authenticated [`Target`].
173169 #[ allow( clippy:: type_complexity) ]
174170 fn current_target (
@@ -1013,10 +1009,6 @@ macro_rules! impl_current_current_resolver {
10131009 S : Strategy ,
10141010 $( $( $where_extra) +) ?
10151011 {
1016- type Family = F ;
1017- type Digest = H :: Digest ;
1018- type Error = qmdb:: Error <F >;
1019-
10201012 async fn current_target( & self ) -> Result <Target <F , H :: Digest >, Self :: Error > {
10211013 let hasher = qmdb:: hasher:: <H >( ) ;
10221014 let witness = self . ops_root_witness( & hasher) . await ?;
@@ -1048,10 +1040,6 @@ macro_rules! impl_current_current_resolver {
10481040 S : Strategy ,
10491041 $( $( $where_extra) +) ?
10501042 {
1051- type Family = F ;
1052- type Digest = H :: Digest ;
1053- type Error = qmdb:: Error <F >;
1054-
10551043 async fn current_target( & self ) -> Result <Target <F , H :: Digest >, Self :: Error > {
10561044 let db = self . read( ) . await ;
10571045 let hasher = qmdb:: hasher:: <H >( ) ;
@@ -1084,10 +1072,6 @@ macro_rules! impl_current_current_resolver {
10841072 S : Strategy ,
10851073 $( $( $where_extra) +) ?
10861074 {
1087- type Family = F ;
1088- type Digest = H :: Digest ;
1089- type Error = qmdb:: Error <F >;
1090-
10911075 async fn current_target( & self ) -> Result <Target <F , H :: Digest >, Self :: Error > {
10921076 let guard = self . read( ) . await ;
10931077 let db = guard. as_ref( )
0 commit comments