diff --git a/.github/workflows/clippy_test.yml b/.github/workflows/clippy_test.yml index 31617818..1c2727d5 100644 --- a/.github/workflows/clippy_test.yml +++ b/.github/workflows/clippy_test.yml @@ -28,7 +28,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: # use toolchain version from rust-toolchain.toml - toolchain: nightly-2023-10-05 + toolchain: nightly components: rustfmt, clippy cache: true # avoid the default "-D warnings" which thrashes cache @@ -48,5 +48,5 @@ jobs: - name: Run fmt+clippy run: | - cargo +nightly-2023-10-05 fmt --all --check - cargo +nightly-2023-10-05 clippy --locked --workspace --all-targets -- -D warnings + cargo +nightly fmt --all --check + cargo +nightly clippy --locked --workspace --all-targets -- -D warnings diff --git a/bench/src/benchnew.rs b/bench/src/benchnew.rs index f25bb743..04643eee 100644 --- a/bench/src/benchnew.rs +++ b/bench/src/benchnew.rs @@ -14,7 +14,6 @@ use clap::{Parser, Subcommand}; #[derive(Parser, Debug)] #[clap(version, about)] - struct Arguments { #[clap(subcommand)] subcommand: SubCommand, diff --git a/lite-rpc/src/cli.rs b/lite-rpc/src/cli.rs index ed20ea35..e2c0e592 100644 --- a/lite-rpc/src/cli.rs +++ b/lite-rpc/src/cli.rs @@ -331,7 +331,7 @@ impl Debug for GrpcSource { fn url_obfuscate_api_token(url: &str) -> Cow { if let Ok(mut parsed) = Url::parse(url) { if parsed.path() == "/" { - return Cow::Borrowed(url); + Cow::Borrowed(url) } else { parsed.set_path("omitted-secret"); Cow::Owned(parsed.to_string()) diff --git a/prioritization_fees/src/stats_calculation.rs b/prioritization_fees/src/stats_calculation.rs index 83f02010..0cce04d0 100644 --- a/prioritization_fees/src/stats_calculation.rs +++ b/prioritization_fees/src/stats_calculation.rs @@ -2,7 +2,7 @@ use crate::{prioritization_fee_data::PrioFeesData, rpc_data::FeePoint}; use itertools::Itertools; use std::iter::zip; -/// `quantile` function is the same as the median if q=50, the same as the minimum if q=0 and the same as the maximum if q=100. +// `quantile` function is the same as the median if q=50, the same as the minimum if q=0 and the same as the maximum if q=100. pub fn calculate_supp_percentiles( // Vec(prioritization_fees, cu_consumed) diff --git a/quic-forward-proxy/src/quinn_auto_reconnect.rs b/quic-forward-proxy/src/quinn_auto_reconnect.rs index fa528c18..bb76430b 100644 --- a/quic-forward-proxy/src/quinn_auto_reconnect.rs +++ b/quic-forward-proxy/src/quinn_auto_reconnect.rs @@ -8,14 +8,14 @@ use tokio::sync::RwLock; use tokio::time::timeout; use tracing::debug; -/// connection manager with automatic reconnect; designated for connection to Solana TPU nodes -/// -/// assumptions: -/// * connection to TPU node is reliable -/// * manager and TPU nodes run both in data centers with fast internet connectivity -/// * ping times vary between 50ms and 400ms depending on the location -/// * TPU address might be wrong which then is a permanent problem -/// * the ActiveConnection instance gets renewed on leader schedule change +// connection manager with automatic reconnect; designated for connection to Solana TPU nodes +// +// assumptions: +// * connection to TPU node is reliable +// * manager and TPU nodes run both in data centers with fast internet connectivity +// * ping times vary between 50ms and 400ms depending on the location +// * TPU address might be wrong which then is a permanent problem +// * the ActiveConnection instance gets renewed on leader schedule change const SEND_TIMEOUT: Duration = Duration::from_secs(5); const MAX_RETRY_ATTEMPTS: u32 = 10; diff --git a/run_clippy_fmt.sh b/run_clippy_fmt.sh index 4b1c613b..2a037cc3 100755 --- a/run_clippy_fmt.sh +++ b/run_clippy_fmt.sh @@ -1,2 +1,2 @@ -cargo +nightly-2023-10-05 fmt --all -cargo +nightly-2023-10-05 clippy --locked --workspace --all-targets -- -D warnings \ No newline at end of file +cargo +nightly fmt --all +cargo +nightly clippy --locked --workspace --all-targets -- -D warnings \ No newline at end of file diff --git a/services/src/tpu_utils/quinn_auto_reconnect.rs b/services/src/tpu_utils/quinn_auto_reconnect.rs index 32f05367..c1a81f45 100644 --- a/services/src/tpu_utils/quinn_auto_reconnect.rs +++ b/services/src/tpu_utils/quinn_auto_reconnect.rs @@ -8,7 +8,7 @@ use tokio::sync::RwLock; use tokio::time::timeout; use tracing::debug; -/// copy of quic-proxy AutoReconnect - used that for reference +// copy of quic-proxy AutoReconnect - used that for reference const SEND_TIMEOUT: Duration = Duration::from_secs(5); const MAX_RETRY_ATTEMPTS: u32 = 10; diff --git a/util/src/histogram_percentiles.rs b/util/src/histogram_percentiles.rs index 09df7fda..85d1a2c9 100644 --- a/util/src/histogram_percentiles.rs +++ b/util/src/histogram_percentiles.rs @@ -24,7 +24,6 @@ pub struct HistValue { } /// `quantile` function is the same as the median if q=50, the same as the minimum if q=0 and the same as the maximum if q=100. - pub fn calculate_percentiles(input: &[f64]) -> Percentiles { if input.is_empty() { // note: percentile for empty array is undefined