File tree Expand file tree Collapse file tree 3 files changed +3
-22
lines changed
ipfs-api/tests/test_support Expand file tree Collapse file tree 3 files changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ pub trait TryFromUri: Sized {
139
139
fn from_ipfs_config ( ) -> Option < Self > {
140
140
dirs:: home_dir ( )
141
141
. map ( |home_dir| home_dir. join ( ".ipfs" ) . join ( "api" ) )
142
- . and_then ( |multiaddr_path| fs:: read_to_string ( & multiaddr_path) . ok ( ) )
142
+ . and_then ( |multiaddr_path| fs:: read_to_string ( multiaddr_path) . ok ( ) )
143
143
. and_then ( |multiaddr_str| Self :: from_multiaddr_str ( & multiaddr_str) . ok ( ) )
144
144
}
145
145
}
Original file line number Diff line number Diff line change @@ -10,26 +10,8 @@ use std::time::Duration;
10
10
use ipfs_api:: response:: VersionResponse ;
11
11
use ipfs_api:: { IpfsApi , IpfsClient , TryFromUri } ;
12
12
13
- #[ cfg( feature = "with-hyper" ) ]
14
- use hyper:: client:: HttpConnector ;
15
-
16
- #[ cfg( feature = "with-hyper-tls" ) ]
17
- use hyper_tls:: HttpsConnector ;
18
-
19
- cfg_if:: cfg_if! {
20
- if #[ cfg( feature = "with-actix" ) ] {
21
- pub fn build_client( api_url: & str ) -> IpfsClient {
22
- IpfsClient :: from_str( api_url) . unwrap( )
23
- }
24
- } else if #[ cfg( feature = "with-hyper-tls" ) ] {
25
- pub fn build_client( api_url: & str ) -> IpfsClient <HttpsConnector <HttpConnector >> {
26
- IpfsClient :: from_str( api_url) . unwrap( )
27
- }
28
- } else if #[ cfg( feature = "with-hyper" ) ] {
29
- pub fn build_client( api_url: & str ) -> IpfsClient <HttpConnector > {
30
- IpfsClient :: from_str( api_url) . unwrap( )
31
- }
32
- }
13
+ pub fn build_client ( api_url : & str ) -> IpfsClient {
14
+ IpfsClient :: from_str ( api_url) . unwrap ( )
33
15
}
34
16
35
17
pub async fn wait_for_server < C : IpfsApi > ( client : & C ) -> Result < VersionResponse , String > {
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ use std::str::FromStr;
13
13
fn strip_path_prefix ( path : & Path ) -> PathBuf {
14
14
let base = path
15
15
. components ( )
16
- . into_iter ( )
17
16
. next ( )
18
17
. unwrap ( )
19
18
. as_os_str ( )
You can’t perform that action at this time.
0 commit comments