File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,10 @@ impl Opts {
97
97
let mut bound = false ;
98
98
#[ cfg( target_family = "unix" ) ]
99
99
if let Some ( socket_path) = & self . daemon_sock {
100
- builder. with_unix_socket ( socket_path) . await . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?;
100
+ builder
101
+ . with_unix_socket ( socket_path)
102
+ . await
103
+ . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?;
101
104
bound = true ;
102
105
}
103
106
@@ -114,7 +117,10 @@ impl Opts {
114
117
. with_url ( url)
115
118
. map_err ( |_| MiniDSPError :: InvalidURL ) ?;
116
119
} else if let Some ( url) = & self . daemon_url {
117
- builder. with_http ( url) . await . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?;
120
+ builder
121
+ . with_http ( url)
122
+ . await
123
+ . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?;
118
124
} else if let Some ( device) = self . hid_option . as_ref ( ) {
119
125
if let Some ( ref path) = device. path {
120
126
builder. with_usb_path ( path) ;
Original file line number Diff line number Diff line change @@ -118,7 +118,9 @@ pub async fn open_url(url: &Url2) -> Result<Transport, MiniDSPError> {
118
118
. into_transport ( ) )
119
119
}
120
120
"tcp" => Ok ( net:: open_url ( url) . await ?. into_transport ( ) ) ,
121
- "ws" | "wss" => Ok ( ws:: open_url ( url) . await . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?) ,
121
+ "ws" | "wss" => Ok ( ws:: open_url ( url)
122
+ . await
123
+ . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?) ,
122
124
#[ cfg( feature = "mock" ) ]
123
125
"mock" => Ok ( mock:: open_url ( url) ) ,
124
126
_ => Err ( MiniDSPError :: InvalidURL ) ,
Original file line number Diff line number Diff line change @@ -130,7 +130,9 @@ pub struct UnixDevice {
130
130
impl Openable for UnixDevice {
131
131
async fn open ( & self ) -> anyhow:: Result < Transport , MiniDSPError > {
132
132
let uri = self . to_url ( ) ;
133
- Ok ( open_unix ( & self . path , & uri) . await . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?)
133
+ Ok ( open_unix ( & self . path , & uri)
134
+ . await
135
+ . map_err ( |e| MiniDSPError :: WebSocketError ( Box :: new ( e) ) ) ?)
134
136
}
135
137
136
138
fn to_url ( & self ) -> String {
You can’t perform that action at this time.
0 commit comments