@@ -34,9 +34,9 @@ use tracing::{debug, info, trace, warn};
3434use super :: { RRECORD_HEAD_KEY , RRECORD_P2P_KEY , get_rrecord_typed} ;
3535use crate :: LOG_TARGET ;
3636use crate :: error:: {
37- ActivateResult , ActivateSnafu , IdResolveError , IdResolveResult , IdSecretReadResult ,
38- InitIrohClientSnafu , InitPkarrClientSnafu , InitResult , InvalidIdSnafu , IoSnafu ,
39- MissingTicketSnafu , ParsingSnafu , PkarrResolveSnafu , PostResult , RRecordSnafu ,
37+ ActivateResult , ActivateSnafu , ConnectResult , IdResolveError , IdResolveResult ,
38+ IdSecretReadResult , InitIrohClientSnafu , InitPkarrClientSnafu , InitResult , InvalidIdSnafu ,
39+ IoSnafu , MissingTicketSnafu , ParsingSnafu , PkarrResolveSnafu , PostResult , RRecordSnafu ,
4040 SecretMismatchSnafu ,
4141} ;
4242use crate :: id:: { CompactTicket , IdPublishedData , IdResolvedData } ;
@@ -227,7 +227,7 @@ impl ClientRef<'_> {
227227 /// Returns a cached connection if available, otherwise creates a new one.
228228 /// This is more efficient than `connect_uncached` when making repeated
229229 /// connections to the same peer.
230- pub async fn connect_cached ( & self , id : RostraId ) -> Option < Connection > {
230+ pub async fn connect_cached ( & self , id : RostraId ) -> ConnectResult < Connection > {
231231 self . connection_cache . get_or_connect ( self , id) . await
232232 }
233233}
0 commit comments