X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/0b33cb55b81b9bb4ce4b67cdf24f079b20f3bd05..3be1c24b1b18115becfaef1e2ea82c914a1fefea:/client/src/jsonrpc.rs diff --git a/client/src/jsonrpc.rs b/client/src/jsonrpc.rs index 3a117ff4..cb1b4f8c 100644 --- a/client/src/jsonrpc.rs +++ b/client/src/jsonrpc.rs @@ -1,8 +1,7 @@ use std::path::Path; use jsonrpsee::async_client::ClientBuilder; -use jsonrpsee::core::client::SubscriptionClientT; -use jsonrpsee::core::Error; +use jsonrpsee::core::client::{Error, SubscriptionClientT}; use jsonrpsee::http_client::HttpClientBuilder; use jsonrpsee::proc_macros::rpc; use serde::Deserialize; @@ -374,7 +373,9 @@ pub struct JsonLink { pub device_link_uri: String, } -pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result { +pub async fn connect_tcp( + tcp: impl ToSocketAddrs, +) -> Result { let (sender, receiver) = super::transports::tcp::connect(tcp).await?; Ok(ClientBuilder::default().build_with_tokio(sender, receiver)) @@ -382,7 +383,7 @@ pub async fn connect_tcp(tcp: impl ToSocketAddrs) -> Result, -) -> Result { +) -> Result { let (sender, receiver) = super::transports::ipc::connect(socket_path).await?; Ok(ClientBuilder::default().build_with_tokio(sender, receiver))