Skip to content

Commit

Permalink
use nightly without explicit version for clippy (#418)
Browse files Browse the repository at this point in the history
clippy+fmt
  • Loading branch information
grooviegermanikus authored Dec 10, 2024
1 parent 5372e9c commit 23b1d00
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/clippy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion bench/src/benchnew.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use clap::{Parser, Subcommand};

#[derive(Parser, Debug)]
#[clap(version, about)]

struct Arguments {
#[clap(subcommand)]
subcommand: SubCommand,
Expand Down
2 changes: 1 addition & 1 deletion lite-rpc/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl Debug for GrpcSource {
fn url_obfuscate_api_token(url: &str) -> Cow<str> {
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())
Expand Down
2 changes: 1 addition & 1 deletion prioritization_fees/src/stats_calculation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions quic-forward-proxy/src/quinn_auto_reconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions run_clippy_fmt.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cargo +nightly-2023-10-05 fmt --all
cargo +nightly-2023-10-05 clippy --locked --workspace --all-targets -- -D warnings
cargo +nightly fmt --all
cargo +nightly clippy --locked --workspace --all-targets -- -D warnings
2 changes: 1 addition & 1 deletion services/src/tpu_utils/quinn_auto_reconnect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion util/src/histogram_percentiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23b1d00

Please sign in to comment.