Skip to content

Commit

Permalink
Update to Rust 1.81.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Sep 12, 2024
1 parent 3392942 commit 924746c
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benches/cluster_map.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(target_pointer_width = "99")]
#![cfg(target_pointer_width = "64")]

use divan::Bencher;
use quilkin::net::cluster::ClusterMap;
Expand Down
2 changes: 1 addition & 1 deletion benches/misc.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg(target_pointer_width = "99")]
#![cfg(target_pointer_width = "64")]

use divan::Bencher;
use prost_types::{value::Kind, Value};
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

[toolchain]
channel = "1.77.1"
channel = "1.81.0"
components = ["rustfmt", "clippy"]
6 changes: 1 addition & 5 deletions src/config/providers/k8s/agones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> = ::serde_json::from_str("[]").expect("valid categories");
let shorts: Vec<String> = ::serde_json::from_str("[]").expect("valid shortnames");
let subres = if true {
Expand Down
1 change: 1 addition & 0 deletions src/filters/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/filters/local_rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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(
Expand All @@ -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.
Expand Down

0 comments on commit 924746c

Please sign in to comment.