Skip to content

Commit b470561

Browse files
committed
chore(*): fmt
1 parent e165cd6 commit b470561

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

minidsp/src/bin/minidsp/main.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ impl Opts {
9797
let mut bound = false;
9898
#[cfg(target_family = "unix")]
9999
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)))?;
101104
bound = true;
102105
}
103106

@@ -114,7 +117,10 @@ impl Opts {
114117
.with_url(url)
115118
.map_err(|_| MiniDSPError::InvalidURL)?;
116119
} 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)))?;
118124
} else if let Some(device) = self.hid_option.as_ref() {
119125
if let Some(ref path) = device.path {
120126
builder.with_usb_path(path);

minidsp/src/transport/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ pub async fn open_url(url: &Url2) -> Result<Transport, MiniDSPError> {
118118
.into_transport())
119119
}
120120
"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)))?),
122124
#[cfg(feature = "mock")]
123125
"mock" => Ok(mock::open_url(url)),
124126
_ => Err(MiniDSPError::InvalidURL),

minidsp/src/transport/ws/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ pub struct UnixDevice {
130130
impl Openable for UnixDevice {
131131
async fn open(&self) -> anyhow::Result<Transport, MiniDSPError> {
132132
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)))?)
134136
}
135137

136138
fn to_url(&self) -> String {

0 commit comments

Comments
 (0)