File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ use http::{
2020 StatusCode ,
2121} ;
2222use serde:: Deserialize ;
23- use std:: fmt:: Display ;
23+ use std:: fmt:: { Debug , Display } ;
2424use tokio_util:: codec:: { Decoder , FramedRead } ;
2525
2626cfg_if:: cfg_if! {
@@ -46,9 +46,9 @@ pub trait Backend {
4646
4747 cfg_if:: cfg_if! {
4848 if #[ cfg( feature = "with-send-sync" ) ] {
49- type Error : Display + From <ApiError > + From <crate :: Error > + Send + ' static ;
49+ type Error : Display + Debug + From <ApiError > + From <crate :: Error > + Send + ' static ;
5050 } else {
51- type Error : Display + From <ApiError > + From <crate :: Error > + ' static ;
51+ type Error : Display + Debug + From <ApiError > + From <crate :: Error > + ' static ;
5252 }
5353 }
5454
Original file line number Diff line number Diff line change 1+ use ipfs_api:: IpfsApi ;
2+
3+ // If this compiles, the test has passed, as unwrap() requires the Debug trait.
4+ #[ allow( unused) ]
5+ async fn test_use_client < C : IpfsApi > ( client : & C ) {
6+ // Validate that all variants of the Backend trait's Error type (Backend::Error) implement the Debug trait.
7+ client. version ( ) . await . unwrap ( ) ;
8+ }
You can’t perform that action at this time.
0 commit comments