File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 3
3
"rust-analyzer.cargo.target" : " wasm32-unknown-unknown" ,
4
4
"rust-analyzer.check.targets" : [" wasm32-unknown-unknown" ],
5
5
"rust-analyzer.check.command" : " clippy" ,
6
- "rust-analyzer.cargo.features" : " all"
6
+ "rust-analyzer.cargo.features" : " all" ,
7
+ "rust-analyzer.cargo.targetDir" : true
7
8
}
Original file line number Diff line number Diff line change @@ -471,3 +471,16 @@ impl Drop for Session {
471
471
self . transport . close ( ) ;
472
472
}
473
473
}
474
+
475
+ impl xwt_core:: stream:: AsErrorCode for Error {
476
+ type ErrorCode = StreamErrorCode ;
477
+
478
+ fn as_error_code ( & self ) -> Option < Self :: ErrorCode > {
479
+ let error: & WebTransportError = self . 0 . dyn_ref ( ) ?;
480
+ if error. source ( ) != WebTransportErrorSource :: Stream {
481
+ return None ;
482
+ }
483
+ let code = error. stream_error_code ( ) . unwrap_or ( 0 ) ;
484
+ Some ( StreamErrorCode ( code. into ( ) ) )
485
+ }
486
+ }
You can’t perform that action at this time.
0 commit comments