Skip to content

Commit

Permalink
Tune up lints for 1.82 Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Oct 21, 2024
1 parent a1192b5 commit 935a137
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -143,6 +144,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -156,6 +158,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
2 changes: 1 addition & 1 deletion src/recorder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ impl<S, L> Builder<S, L> {
/// );
/// # Ok::<_, prometheus::Error>(())
/// ```
// TODO: Try remove on Rust 1.82 upgrade.
// TODO: Try remove on Rust 1.83 upgrade.
#[expect( // anonymous lifetimes in `impl Trait` are unstable
single_use_lifetimes,
reason = "anonymous lifetimes in `impl Trait` are unstable"
Expand Down
7 changes: 4 additions & 3 deletions src/storage/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ use super::KeyName;
pub type Collection<M> = HashMap<KeyName, metric::Describable<M>>;

/// Snapshot of a [`mutable::Storage`], that is not capable of registering
/// metrics in a [`prometheus::Registry`] on the fly, but still allowing to
/// change their [`help` description] on the fly, once they were registered in
/// the [`mutable::Storage`] before snapshot.
/// metrics in a [`prometheus::Registry`] on the fly.
///
/// However, still allows to change metrics [`help` description] on the fly,
/// once they are registered in a [`mutable::Storage`] before snapshot.
///
/// In comparison with a [`metrics::Registry`], this immutable [`Storage`]
/// provides much less overhead of accessing an already registered metric (just
Expand Down

0 comments on commit 935a137

Please sign in to comment.