mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Fix clippy warnings
This commit is contained in:
parent
1b7f755590
commit
ff846bc678
3 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@ async fn handle_command(
|
||||||
.await
|
.await
|
||||||
.map_err(|e| RpcError::Custom(format!("JSON-RPC command startLink failed: {e:?}")))?
|
.map_err(|e| RpcError::Custom(format!("JSON-RPC command startLink failed: {e:?}")))?
|
||||||
.device_link_uri;
|
.device_link_uri;
|
||||||
println!("{}", url);
|
println!("{url}");
|
||||||
client.finish_link(url, name).await
|
client.finish_link(url, name).await
|
||||||
}
|
}
|
||||||
CliCommands::ListAccounts => client.list_accounts().await,
|
CliCommands::ListAccounts => client.list_accounts().await,
|
||||||
|
|
|
@ -27,7 +27,7 @@ impl<T: Send + Sink<String, Error = impl std::error::Error> + Unpin + 'static> T
|
||||||
self.inner
|
self.inner
|
||||||
.send(body)
|
.send(body)
|
||||||
.await
|
.await
|
||||||
.map_err(|e| Errors::Other(format!("{:?}", e)))?;
|
.map_err(|e| Errors::Other(format!("{e:?}")))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ impl<T: Send + Sink<String, Error = impl std::error::Error> + Unpin + 'static> T
|
||||||
self.inner
|
self.inner
|
||||||
.close()
|
.close()
|
||||||
.await
|
.await
|
||||||
.map_err(|e| Errors::Other(format!("{:?}", e)))?;
|
.map_err(|e| Errors::Other(format!("{e:?}")))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ impl<T: Send + Stream<Item = Result<String, std::io::Error>> + Unpin + 'static>
|
||||||
match self.inner.next().await {
|
match self.inner.next().await {
|
||||||
None => Err(Errors::Closed),
|
None => Err(Errors::Closed),
|
||||||
Some(Ok(msg)) => Ok(ReceivedMessage::Text(msg)),
|
Some(Ok(msg)) => Ok(ReceivedMessage::Text(msg)),
|
||||||
Some(Err(e)) => Err(Errors::Other(format!("{:?}", e))),
|
Some(Err(e)) => Err(Errors::Other(format!("{e:?}"))),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ impl Decoder for StreamCodec {
|
||||||
|
|
||||||
match str::from_utf8(line.as_ref()) {
|
match str::from_utf8(line.as_ref()) {
|
||||||
Ok(s) => Ok(Some(s.to_string())),
|
Ok(s) => Ok(Some(s.to_string())),
|
||||||
Err(_) => Err(io::Error::new(io::ErrorKind::Other, "invalid UTF-8")),
|
Err(_) => Err(io::Error::other("invalid UTF-8")),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ok(None)
|
Ok(None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue