Skip to content

Commit

Permalink
misc: add rustfmt.toml (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
fanatid authored Apr 5, 2024
1 parent 3e6aea0 commit e470615
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
edition = "2021"
imports_granularity = "One"
group_imports = "One"
3 changes: 1 addition & 2 deletions yellowstone-grpc-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub use tonic::service::Interceptor;
use {
bytes::Bytes,
futures::{
Expand All @@ -23,8 +24,6 @@ use {
},
};

pub use tonic::service::Interceptor;

#[derive(Debug, Clone)]
pub struct InterceptorXToken {
pub x_token: Option<AsciiMetadataValue>,
Expand Down
3 changes: 1 addition & 2 deletions yellowstone-grpc-geyser/src/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
6 changes: 2 additions & 4 deletions yellowstone-grpc-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e470615

Please sign in to comment.