Fix clippy warnings
This commit is contained in:
parent
1fc56ac8f1
commit
1651b73426
|
@ -1,6 +1,5 @@
|
||||||
//! Sbot type and connection-related methods.
|
//! Sbot type and connection-related methods.
|
||||||
use async_std::net::TcpStream;
|
use async_std::net::TcpStream;
|
||||||
use log::debug;
|
|
||||||
|
|
||||||
use kuska_handshake::async_std::BoxStream;
|
use kuska_handshake::async_std::BoxStream;
|
||||||
use kuska_sodiumoxide::crypto::{auth, sign::ed25519};
|
use kuska_sodiumoxide::crypto::{auth, sign::ed25519};
|
||||||
|
@ -65,7 +64,7 @@ impl Sbot {
|
||||||
ip_port.unwrap()
|
ip_port.unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
if address.starts_with(":") {
|
if address.starts_with(':') {
|
||||||
address = format!("127.0.0.1{}", address);
|
address = format!("127.0.0.1{}", address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +84,7 @@ impl Sbot {
|
||||||
Keystore::CustomGoSbot(key_path) => {
|
Keystore::CustomGoSbot(key_path) => {
|
||||||
keystore::from_custom_gosbot_keypath(key_path.to_string())
|
keystore::from_custom_gosbot_keypath(key_path.to_string())
|
||||||
.await
|
.await
|
||||||
.expect(&format!(
|
.unwrap_or_else(|_| panic!(
|
||||||
"couldn't read local go-sbot secret from: {}",
|
"couldn't read local go-sbot secret from: {}",
|
||||||
key_path
|
key_path
|
||||||
))
|
))
|
||||||
|
@ -93,7 +92,7 @@ impl Sbot {
|
||||||
Keystore::CustomPatchwork(key_path) => {
|
Keystore::CustomPatchwork(key_path) => {
|
||||||
keystore::from_custom_patchwork_keypath(key_path.to_string())
|
keystore::from_custom_patchwork_keypath(key_path.to_string())
|
||||||
.await
|
.await
|
||||||
.expect(&format!(
|
.unwrap_or_else(|_| panic!(
|
||||||
"couldn't read local patchwork secret from: {}",
|
"couldn't read local patchwork secret from: {}",
|
||||||
key_path
|
key_path
|
||||||
))
|
))
|
||||||
|
|
|
@ -76,7 +76,7 @@ where
|
||||||
if id == req_no {
|
if id == req_no {
|
||||||
match msg {
|
match msg {
|
||||||
RecvMsg::RpcResponse(_type, body) => {
|
RecvMsg::RpcResponse(_type, body) => {
|
||||||
return f(&body).map_err(|err| err);
|
return f(&body);
|
||||||
}
|
}
|
||||||
RecvMsg::ErrorResponse(message) => {
|
RecvMsg::ErrorResponse(message) => {
|
||||||
return Err(GolgiError::Sbot(message));
|
return Err(GolgiError::Sbot(message));
|
||||||
|
|
Loading…
Reference in New Issue