diff --git a/benches/cluster_map.rs b/benches/cluster_map.rs index 8234d4373f..193f01d570 100644 --- a/benches/cluster_map.rs +++ b/benches/cluster_map.rs @@ -1,4 +1,4 @@ -#![cfg(target_pointer_width = "99")] +#![cfg(target_pointer_width = "64")] use divan::Bencher; use quilkin::net::cluster::ClusterMap; diff --git a/benches/misc.rs b/benches/misc.rs index 1bcce3bc98..f9dfe53723 100644 --- a/benches/misc.rs +++ b/benches/misc.rs @@ -1,4 +1,4 @@ -#![cfg(target_pointer_width = "99")] +#![cfg(target_pointer_width = "64")] use divan::Bencher; use prost_types::{value::Kind, Value}; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 87e2b06ba8..460612ae6e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -13,5 +13,5 @@ # limitations under the License. [toolchain] -channel = "1.77.1" +channel = "1.81.0" components = ["rustfmt", "clippy"] diff --git a/src/config/providers/k8s/agones.rs b/src/config/providers/k8s/agones.rs index 8c96112e75..6d69af1f23 100644 --- a/src/config/providers/k8s/agones.rs +++ b/src/config/providers/k8s/agones.rs @@ -639,11 +639,7 @@ impl ::kube::core::crd::v1::CustomResourceExt for Fleet { > = ::serde_json::from_str("[ ]").expect("valid printer column json"); let scale: Option< ::k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceSubresourceScale, - > = if "".is_empty() { - None - } else { - ::serde_json::from_str("").expect("valid scale subresource json") - }; + > = None; let categories: Vec = ::serde_json::from_str("[]").expect("valid categories"); let shorts: Vec = ::serde_json::from_str("[]").expect("valid shortnames"); let subres = if true { diff --git a/src/filters/factory.rs b/src/filters/factory.rs index 0f5a3fbca0..f4f8ee6d1f 100644 --- a/src/filters/factory.rs +++ b/src/filters/factory.rs @@ -72,6 +72,7 @@ pub trait FilterFactory: Sync + Send { /// - `module`: The rust module name containing the filter item /// - `version`: The filter's version. /// - `item-name`: The name of the rust item (e.g enum, struct) implementing the filter. + /// /// For example the `v1alpha1` version of the debug filter has the name: /// `quilkin.filters.debug_filter.v1alpha1.Debug` fn name(&self) -> &'static str; diff --git a/src/filters/local_rate_limit.rs b/src/filters/local_rate_limit.rs index fe324b8714..2964e5e834 100644 --- a/src/filters/local_rate_limit.rs +++ b/src/filters/local_rate_limit.rs @@ -39,6 +39,7 @@ const SESSION_EXPIRY_POLL_INTERVAL: Duration = Duration::from_secs(60); /// - A counter that tracks how many packets we've processed within a time window. /// - A timestamp that stores the time we last reset the counter. It tracks /// the start of the time window. +/// /// This allows us to have a simpler implementation for calculating token /// exhaustion without needing a write lock in the common case. The downside /// however is that since we're relying on two independent atomics, there is diff --git a/src/metrics.rs b/src/metrics.rs index 66edead875..75019a8a66 100644 --- a/src/metrics.rs +++ b/src/metrics.rs @@ -165,7 +165,7 @@ pub(crate) fn bytes_total(direction: Direction, asn: &AsnInfo) -> IntCounter { .unwrap() }); - BYTES_TOTAL.with_label_values(&[direction.label(), asn.asn_str(), &asn.prefix]) + BYTES_TOTAL.with_label_values(&[direction.label(), asn.asn_str(), asn.prefix]) } pub(crate) fn errors_total(direction: Direction, display: &str, asn: &AsnInfo) -> IntCounter { @@ -181,7 +181,7 @@ pub(crate) fn errors_total(direction: Direction, display: &str, asn: &AsnInfo) - .unwrap() }); - ERRORS_TOTAL.with_label_values(&[direction.label(), display, asn.asn_str(), &asn.prefix]) + ERRORS_TOTAL.with_label_values(&[direction.label(), display, asn.asn_str(), asn.prefix]) } pub(crate) fn packet_jitter(direction: Direction, asn: &AsnInfo) -> IntGauge { @@ -197,7 +197,7 @@ pub(crate) fn packet_jitter(direction: Direction, asn: &AsnInfo) -> IntGauge { .unwrap() }); - PACKET_JITTER.with_label_values(&[direction.label(), asn.asn_str(), &asn.prefix]) + PACKET_JITTER.with_label_values(&[direction.label(), asn.asn_str(), asn.prefix]) } pub(crate) fn packets_total(direction: Direction, asn: &AsnInfo) -> IntCounter { @@ -213,7 +213,7 @@ pub(crate) fn packets_total(direction: Direction, asn: &AsnInfo) -> IntCounter { .unwrap() }); - PACKETS_TOTAL.with_label_values(&[direction.label(), asn.asn_str(), &asn.prefix]) + PACKETS_TOTAL.with_label_values(&[direction.label(), asn.asn_str(), asn.prefix]) } pub(crate) fn packets_dropped_total( @@ -233,7 +233,7 @@ pub(crate) fn packets_dropped_total( .unwrap() }); - PACKETS_DROPPED.with_label_values(&[direction.label(), source, asn.asn_str(), &asn.prefix]) + PACKETS_DROPPED.with_label_values(&[direction.label(), source, asn.asn_str(), asn.prefix]) } /// Create a generic metrics options.