File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
use std:: net:: SocketAddr ;
7
7
use std:: path:: PathBuf ;
8
- use std:: str:: FromStr ;
9
8
use std:: sync:: Arc ;
10
9
11
10
use arti_client:: config:: onion_service:: OnionServiceConfigBuilder ;
@@ -96,7 +95,7 @@ pub async fn launch_onion_service<S>(
96
95
custom_path : Option < PathBuf > ,
97
96
) -> Result < Arc < RunningOnionService > , Error >
98
97
where
99
- S : AsRef < str > ,
98
+ S : Into < String > ,
100
99
{
101
100
// Get tor client
102
101
let client: & TorClient < PreferredRuntime > = get_tor_client ( custom_path) . await ?;
@@ -109,7 +108,7 @@ where
109
108
config. set_proxy_ports ( vec ! [ ProxyRule :: new( pattern, action) ] ) ;
110
109
let proxy = OnionServiceReverseProxy :: new ( config. build ( ) ?) ;
111
110
112
- let nickname: HsNickname = HsNickname :: from_str ( nickname. as_ref ( ) ) ?;
111
+ let nickname: HsNickname = HsNickname :: new ( nickname. into ( ) ) ?;
113
112
let config: OnionServiceConfig = OnionServiceConfigBuilder :: default ( )
114
113
. nickname ( nickname. clone ( ) )
115
114
. build ( ) ?;
You can’t perform that action at this time.
0 commit comments