diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48406a6..bb1b67c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,6 +36,13 @@ jobs: echo "GEYSER_PLUGIN_NAME=$plugin_name" | tee -a $GITHUB_ENV echo "GEYSER_PLUGIN_LIB=lib${plugin_lib_name}" | tee -a $GITHUB_ENV + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + profile: minimal + components: rustfmt + - uses: actions-rs/toolchain@v1 with: toolchain: ${{ env.RUST_STABLE }} @@ -65,7 +72,7 @@ jobs: cargo tree --frozen - name: cargo fmt - run: cargo fmt --all -- --check + run: cargo +nightly fmt --all -- --check - name: cargo deny check advisories uses: EmbarkStudios/cargo-deny-action@v1 diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..fe957b9 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +edition = "2021" +imports_granularity = "One" +group_imports = "One" diff --git a/yellowstone-grpc-client/src/lib.rs b/yellowstone-grpc-client/src/lib.rs index 61fcf80..8d57d30 100644 --- a/yellowstone-grpc-client/src/lib.rs +++ b/yellowstone-grpc-client/src/lib.rs @@ -1,3 +1,4 @@ +pub use tonic::service::Interceptor; use { bytes::Bytes, futures::{ @@ -23,8 +24,6 @@ use { }, }; -pub use tonic::service::Interceptor; - #[derive(Debug, Clone)] pub struct InterceptorXToken { pub x_token: Option, diff --git a/yellowstone-grpc-geyser/src/filters.rs b/yellowstone-grpc-geyser/src/filters.rs index 04425e5..62ea1bd 100644 --- a/yellowstone-grpc-geyser/src/filters.rs +++ b/yellowstone-grpc-geyser/src/filters.rs @@ -839,8 +839,7 @@ mod tests { }, solana_sdk::{ hash::Hash, - message::Message as SolMessage, - message::{v0::LoadedAddresses, MessageHeader}, + message::{v0::LoadedAddresses, Message as SolMessage, MessageHeader}, pubkey::Pubkey, signer::{keypair::Keypair, Signer}, transaction::{SanitizedTransaction, Transaction}, diff --git a/yellowstone-grpc-proto/src/lib.rs b/yellowstone-grpc-proto/src/lib.rs index f4d5bb6..8760c7c 100644 --- a/yellowstone-grpc-proto/src/lib.rs +++ b/yellowstone-grpc-proto/src/lib.rs @@ -13,12 +13,10 @@ pub mod solana { } pub mod prelude { - pub use super::geyser::*; - pub use super::solana::storage::confirmed_block::*; + pub use super::{geyser::*, solana::storage::confirmed_block::*}; } -pub use prost; -pub use tonic; +pub use {prost, tonic}; pub mod convert_to { use {