consequently use prometheus 0.14 and fix clippy

This commit is contained in:
Marcel Märtens
2025-05-05 22:19:58 +02:00
parent d9291896ca
commit 190e148bdc
4 changed files with 10 additions and 24 deletions

24
Cargo.lock generated
View File

@ -5460,20 +5460,6 @@ dependencies = [
"syn 2.0.101",
]
[[package]]
name = "prometheus"
version = "0.13.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1"
dependencies = [
"cfg-if 1.0.0",
"fnv",
"lazy_static",
"memchr",
"parking_lot",
"thiserror 1.0.69",
]
[[package]]
name = "prometheus"
version = "0.14.0"
@ -5498,7 +5484,7 @@ dependencies = [
"http-body-util",
"hyper",
"hyper-util",
"prometheus 0.14.0",
"prometheus",
"tokio",
"tracing",
]
@ -8018,7 +8004,7 @@ dependencies = [
"hashbrown 0.15.3",
"lazy_static",
"lz-fear",
"prometheus 0.13.4",
"prometheus",
"prometheus-hyper",
"quinn",
"rand 0.8.5",
@ -8044,7 +8030,7 @@ dependencies = [
"bytes",
"criterion",
"hashbrown 0.15.3",
"prometheus 0.13.4",
"prometheus",
"rand 0.8.5",
"tokio",
"tracing",
@ -8108,7 +8094,7 @@ dependencies = [
"num_cpus",
"parking_lot",
"portpicker",
"prometheus 0.13.4",
"prometheus",
"quinn",
"rand 0.8.5",
"rayon",
@ -8169,7 +8155,7 @@ dependencies = [
"lazy_static",
"mimalloc",
"num_cpus",
"prometheus 0.13.4",
"prometheus",
"rand 0.8.5",
"ratatui",
"ron",

View File

@ -170,8 +170,8 @@ noise = { version = "0.9", default-features = false }
num = { version = "0.4" }
num-traits = { version = "0.2" }
ordered-float = { version = "4.2", default-features = true }
prometheus = { version = "0.13", default-features = false }
prometheus-hyper = "0.2"
prometheus = { version = "0.14", default-features = false }
prometheus-hyper = "0.2.1"
rand = { version = "0.8" }
rand_chacha = { version = "0.3" }
rayon = { version = "1.5" }

View File

@ -248,7 +248,7 @@ impl ProtocolMetricCache {
}
pub(crate) fn init_sid(&mut self, sid: Sid) -> &CacheLine {
let cid = &self.cid;
let cid = self.cid.as_str();
let m = &self.m;
self.cache.entry(sid).or_insert_with_key(|sid| {
let s = sid.to_string();
@ -347,7 +347,7 @@ impl ProtocolMetricCache {
#[cfg(feature = "metrics")]
impl Drop for ProtocolMetricCache {
fn drop(&mut self) {
let cid = &self.cid;
let cid = self.cid.as_str();
let m = &self.m;
let finished = RemoveReason::Finished.to_str();
let dropped = RemoveReason::Dropped.to_str();

View File

@ -83,7 +83,7 @@ pub fn set_panic_hook(log_filename: String, logs_dir: PathBuf) {
.set_title("Veloren has crashed!")
//somehow `<` and `>` are invalid characters and cause the msg to get replaced
// by some generic text thus i replace them
.set_text(&dialog_message.replace('<', "[").replace('>', "]"))
.set_text(dialog_message.replace('<', "[").replace('>', "]"))
.alert()
.show()
.unwrap()