Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2023-12-21 21:12:00 +00:00 committed by GitHub
parent 0cd8135f88
commit d2532864a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 11 deletions

View File

@ -1 +1 @@
pub mod provider;
pub mod provider;

View File

@ -1,4 +1,3 @@
use crate::types::*;
use anyhow::Result;
use ethers::core::types::Filter;
@ -54,9 +53,7 @@ pub async fn provider(
) -> Result<()> {
println!("eth_rpc: starting");
while let Some(message) = recv_in_client.recv().await {
};
while let Some(message) = recv_in_client.recv().await {}
Ok(())
}
@ -68,7 +65,8 @@ pub async fn eth_provider(
mut recv_in_client: MessageReceiver,
print_tx: PrintSender,
) -> Result<()> {
let mut subscriptions = HashMap::<u64, tokio::task::JoinHandle<Result<(), EthProviderError>>>::new();
let mut subscriptions =
HashMap::<u64, tokio::task::JoinHandle<Result<(), EthProviderError>>>::new();
while let Some(message) = recv_in_client.recv().await {
let our = our.clone();
@ -141,9 +139,9 @@ pub async fn eth_provider(
message: Message::Response((
Response {
inherit: false,
ipc: serde_json::to_vec::<Result<u64, EthProviderError>>(
&Ok(message.id),
)
ipc: serde_json::to_vec::<Result<u64, EthProviderError>>(&Ok(
message.id,
))
.unwrap(),
metadata: None,
},
@ -293,7 +291,11 @@ pub async fn eth_provider(
// helpers
//
fn make_error_message(our_name: String, km: &KernelMessage, error: EthProviderError) -> KernelMessage {
fn make_error_message(
our_name: String,
km: &KernelMessage,
error: EthProviderError,
) -> KernelMessage {
KernelMessage {
id: km.id,
source: Address {
@ -316,4 +318,4 @@ fn make_error_message(our_name: String, km: &KernelMessage, error: EthProviderEr
payload: None,
signed_capabilities: None,
}
}
}