File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,12 @@ use std::{
10
10
} ;
11
11
12
12
use conn:: Conn ;
13
+ #[ cfg( not( wasm_browser) ) ]
13
14
use connect_relay:: DnsError ;
14
15
use iroh_base:: { RelayUrl , SecretKey } ;
15
16
use n0_future:: {
16
17
split:: { split, SplitSink , SplitStream } ,
17
- Sink , Stream ,
18
+ time , Sink , Stream ,
18
19
} ;
19
20
#[ cfg( any( test, feature = "test-utils" ) ) ]
20
21
use tracing:: warn;
@@ -52,6 +53,7 @@ pub enum Error {
52
53
InvalidWebsocketUrl ( Url ) ,
53
54
#[ error( transparent) ]
54
55
Websocket ( #[ from] tokio_tungstenite_wasm:: Error ) ,
56
+ #[ cfg( not( wasm_browser) ) ]
55
57
#[ error( transparent) ]
56
58
Dns ( #[ from] DnsError ) ,
57
59
#[ error( transparent) ]
@@ -67,7 +69,7 @@ pub enum Error {
67
69
#[ error( transparent) ]
68
70
Io ( #[ from] std:: io:: Error ) ,
69
71
#[ error( "Timeout" ) ]
70
- Timeout ( #[ from] tokio :: time:: error :: Elapsed ) ,
72
+ Timeout ( #[ from] time:: Elapsed ) ,
71
73
#[ error( transparent) ]
72
74
Http ( #[ from] hyper:: http:: Error ) ,
73
75
#[ error( "Unexpected frame received {0}" ) ]
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use bytes::{BufMut, Bytes};
16
16
use iroh_base:: { PublicKey , SecretKey , Signature , SignatureError } ;
17
17
#[ cfg( feature = "server" ) ]
18
18
use n0_future:: time:: Duration ;
19
- use n0_future:: { Sink , SinkExt } ;
19
+ use n0_future:: { time , Sink , SinkExt } ;
20
20
#[ cfg( any( test, feature = "server" ) ) ]
21
21
use n0_future:: { Stream , StreamExt } ;
22
22
use postcard:: experimental:: max_size:: MaxSize ;
@@ -137,7 +137,7 @@ pub enum Error {
137
137
#[ error( transparent) ]
138
138
SerDe ( #[ from] postcard:: Error ) ,
139
139
#[ error( "timeout" ) ]
140
- Timeout ( #[ from] tokio :: time:: error :: Elapsed ) ,
140
+ Timeout ( #[ from] time:: Elapsed ) ,
141
141
#[ error( transparent) ]
142
142
InvalidSignature ( #[ from] SignatureError ) ,
143
143
#[ error( transparent) ]
You can’t perform that action at this time.
0 commit comments