Skip to content

Commit

Permalink
misc. formatter tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Sep 26, 2024
1 parent 0fc1630 commit 05a5de3
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ max_width = 120
newline_style = "Unix"
overflow_delimited_expr = true
spaces_around_ranges = true
style_edition = "2021"
tab_spaces = 2
use_field_init_shorthand = true
use_small_heuristics = "Max"
use_try_shorthand = true
version = "Two"
wrap_comments = true
2 changes: 1 addition & 1 deletion src/api/account_balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ pub use mesh::models::{
};

use crate::{
MinaMesh, MinaMeshError,
graphql::{Account, AnnotatedBalance, Balance, Length, QueryBalance, QueryBalanceVariables, StateHash},
util::Wrapper,
MinaMesh, MinaMeshError,
};

/// https://github.com/MinaProtocol/mina/blob/985eda49bdfabc046ef9001d3c406e688bc7ec45/src/app/rosetta/lib/account.ml#L11
Expand Down
2 changes: 1 addition & 1 deletion src/api/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use cynic::QueryBuilder;
pub use mesh::models::{BlockRequest, BlockResponse, PartialBlockIdentifier};

use crate::{
MinaMesh, MinaMeshError, Wrapper,
graphql::{QueryBlockTransactions, QueryBlockTransactionsVariables},
MinaMesh, MinaMeshError, Wrapper,
};

#[derive(sqlx::Type, Debug, PartialEq, Eq)]
Expand Down
2 changes: 1 addition & 1 deletion src/api/mempool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use anyhow::Result;
use cynic::QueryBuilder;
pub use mesh::models::{MempoolResponse, TransactionIdentifier};

use crate::{MinaMesh, graphql::QueryMempool};
use crate::{graphql::QueryMempool, MinaMesh};

/// https://github.com/MinaProtocol/mina/blob/985eda49bdfabc046ef9001d3c406e688bc7ec45/src/app/rosetta/lib/mempool.ml#L56
impl MinaMesh {
Expand Down
2 changes: 1 addition & 1 deletion src/api/mempool_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use cynic::QueryBuilder;
pub use mesh::models::{MempoolTransactionRequest, MempoolTransactionResponse, Transaction, TransactionIdentifier};

use crate::{
MinaMesh, MinaMeshError,
graphql::{QueryMempoolTransactions, QueryMempoolTransactionsVariables},
MinaMesh, MinaMeshError,
};

/// https://github.com/MinaProtocol/mina/blob/985eda49bdfabc046ef9001d3c406e688bc7ec45/src/app/rosetta/lib/mempool.ml#L137
Expand Down
2 changes: 1 addition & 1 deletion src/api/network_health_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use cynic::QueryBuilder;
use mesh::models::NetworkIdentifier;

use crate::{MinaMesh, graphql::QueryNetworkId};
use crate::{graphql::QueryNetworkId, MinaMesh};

impl MinaMesh {
pub async fn network_health_check(self, network_identifier: NetworkIdentifier) -> Result<bool> {
Expand Down
2 changes: 1 addition & 1 deletion src/api/network_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use anyhow::Result;
use cynic::QueryBuilder;
pub use mesh::models::{NetworkIdentifier, NetworkListResponse};

use crate::{MinaMesh, graphql::QueryNetworkId};
use crate::{graphql::QueryNetworkId, MinaMesh};

/// https://github.com/MinaProtocol/mina/blob/985eda49bdfabc046ef9001d3c406e688bc7ec45/src/app/rosetta/lib/network.ml#L162
impl MinaMesh {
Expand Down
2 changes: 1 addition & 1 deletion src/api/network_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use cynic::QueryBuilder;
pub use mesh::models::{BlockIdentifier, NetworkStatusResponse, Peer};

use crate::{
MinaMesh, MinaMeshError,
graphql::{Block3, DaemonStatus3, QueryNetworkStatus},
MinaMesh, MinaMeshError,
};

/// https://github.com/MinaProtocol/mina/blob/985eda49bdfabc046ef9001d3c406e688bc7ec45/src/app/rosetta/lib/network.ml#L201
Expand Down
4 changes: 2 additions & 2 deletions src/commands/fetch_genesis_block_identifier.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{Result, bail};
use anyhow::{bail, Result};
use clap::Args;
use cynic::{QueryBuilder, http::ReqwestExt};
use cynic::{http::ReqwestExt, QueryBuilder};

use crate::graphql::QueryGenesisBlockIdentifier;

Expand Down
4 changes: 2 additions & 2 deletions src/commands/serve.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::sync::Arc;

use anyhow::Result;
use axum::{Json, Router, extract::State, response::IntoResponse, routing::post, serve};
use axum::{extract::State, response::IntoResponse, routing::post, serve, Json, Router};
use clap::Args;
use paste::paste;
use tokio::net::TcpListener;

use crate::{MinaMesh, MinaMeshConfig, util::Wrapper};
use crate::{util::Wrapper, MinaMesh, MinaMeshConfig};

#[derive(Debug, Args)]
#[command(about = "Start the Mina Mesh Server.")]
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use clap::Args;
use mesh::models::BlockIdentifier;
use sqlx::PgPool;

use crate::{MinaMesh, graphql::GraphQLClient};
use crate::{graphql::GraphQLClient, MinaMesh};

#[derive(Debug, Args)]
pub struct MinaMeshConfig {
Expand Down
2 changes: 1 addition & 1 deletion tests/block.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::sync::OnceLock;

use anyhow::Result;
use futures::{StreamExt, stream::FuturesUnordered};
use futures::{stream::FuturesUnordered, StreamExt};
use mina_mesh::{BlockMetadata, MinaMeshConfig, PartialBlockIdentifier};

#[tokio::test]
Expand Down

0 comments on commit 05a5de3

Please sign in to comment.