From 74b5abda91b6e2f4ca6e006ad665983298e3d60d Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 25 Dec 2023 13:04:35 +0100 Subject: [PATCH] Corrections --- CHANGELOG.md | 2 +- src/lib.rs | 20 ++++++++++++-------- src/recorder/mod.rs | 34 +++++++++++++++++----------------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fe07b..e664e39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ All user visible changes to this project will be documented in this file. This p - Upgraded to 0.22 version of `metrics` crate. ([#9]) - Upgraded to 0.16 version of `metrics-util` crate. ([#9]) -[#5]: /../../pull/9 +[#9]: /../../pull/9 diff --git a/src/lib.rs b/src/lib.rs index b1ff1b0..c98ebe3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -191,22 +191,24 @@ pub use self::{ }; /// Tries to install a default [`Recorder`] (backed by the -/// [`prometheus::default_registry()`]) with [`metrics::set_global_recorder()`]. +/// [`prometheus::default_registry()`]) with the +/// [`metrics::set_global_recorder()`]. /// /// # Errors /// -/// If the [`Recorder`] fails to be installed with +/// If the [`Recorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. pub fn try_install() -> Result> { Recorder::builder().try_build_and_install() } /// Tries to install a default [`FreezableRecorder`] (backed by the -/// [`prometheus::default_registry()`]) with [`metrics::set_global_recorder()`]. +/// [`prometheus::default_registry()`]) with the +/// [`metrics::set_global_recorder()`]. /// /// # Errors /// -/// If the [`FreezableRecorder`] fails to be installed with +/// If the [`FreezableRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. pub fn try_install_freezable( ) -> Result> { @@ -214,11 +216,12 @@ pub fn try_install_freezable( } /// Installs a default [`Recorder`] (backed by the -/// [`prometheus::default_registry()`]) with [`metrics::set_global_recorder()`]. +/// [`prometheus::default_registry()`]) with the +/// [`metrics::set_global_recorder()`]. /// /// # Panics /// -/// If the [`Recorder`] fails to be installed with +/// If the [`Recorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. // We do intentionally omit `#[must_use]` here, as we don't want to force // library users using the returned `Recorder` directly. @@ -228,11 +231,12 @@ pub fn install() -> Recorder { } /// Installs a default [`FreezableRecorder`] (backed by the -/// [`prometheus::default_registry()`]) with [`metrics::set_global_recorder()`]. +/// [`prometheus::default_registry()`]) with the +/// [`metrics::set_global_recorder()`]. /// /// # Panics /// -/// If the [`FreezableRecorder`] fails to be installed with +/// If the [`FreezableRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. // We do intentionally omit `#[must_use]` here, as we don't want to force // library users using the returned `FreezableRecorder` directly. diff --git a/src/recorder/mod.rs b/src/recorder/mod.rs index 2ce6e8c..cf10824 100644 --- a/src/recorder/mod.rs +++ b/src/recorder/mod.rs @@ -512,7 +512,7 @@ pub struct Builder< failure_strategy: FailureStrategy, /// [`metrics::Layer`]s to wrap the built [`Recorder`] with upon its - /// installation with [`metrics::set_global_recorder()`]. + /// installation with the [`metrics::set_global_recorder()`]. /// /// [`metrics::Layer`]: Layer layers: Layers, @@ -744,7 +744,7 @@ impl Builder { /// # Usage /// /// Use this method if you want to: - /// - either install the built [`Recorder`] with + /// - either install the built [`Recorder`] with the /// [`metrics::set_global_recorder()`] manually; /// - or to compose the built [`Recorder`] with some other /// [`metrics::Recorder`]s (like being able to write into multiple @@ -778,7 +778,7 @@ impl Builder { /// # Usage /// /// Use this method if you want to: - /// - either install the built [`FreezableRecorder`] with + /// - either install the built [`FreezableRecorder`] with the /// [`metrics::set_global_recorder()`] manually; /// - or to compose the built [`FreezableRecorder`] with some other /// [`metrics::Recorder`]s (like being able to write into multiple @@ -814,7 +814,7 @@ impl Builder { /// # Usage /// /// Use this method if you want to: - /// - either install the built [`FrozenRecorder`] with + /// - either install the built [`FrozenRecorder`] with the /// [`metrics::set_global_recorder()`] manually; /// - or to compose the built [`FrozenRecorder`] with some other /// [`metrics::Recorder`]s (like being able to write into multiple @@ -840,11 +840,11 @@ impl Builder { } /// Builds a [`Recorder`] out of this [`Builder`] and tries to install it - /// with [`metrics::set_global_recorder()`]. + /// with the [`metrics::set_global_recorder()`]. /// /// # Errors /// - /// If the built [`Recorder`] fails to be installed with + /// If the built [`Recorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -922,11 +922,11 @@ impl Builder { } /// Builds a [`FreezableRecorder`] out of this [`Builder`] and tries to - /// install it with [`metrics::set_global_recorder()`]. + /// install it with the [`metrics::set_global_recorder()`]. /// /// # Errors /// - /// If the built [`FreezableRecorder`] fails to be installed with + /// If the built [`FreezableRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -997,7 +997,7 @@ impl Builder { } /// Builds a [`FrozenRecorder`] out of this [`Builder`] and tries to install - /// it with [`metrics::set_global_recorder()`]. + /// it with the [`metrics::set_global_recorder()`]. /// /// Returns the [`prometheus::Registry`] backing the installed /// [`FrozenRecorder`], as there is nothing you can configure with the @@ -1005,7 +1005,7 @@ impl Builder { /// /// # Errors /// - /// If the built [`FrozenRecorder`] fails to be installed with + /// If the built [`FrozenRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -1070,12 +1070,12 @@ impl Builder { Ok(storage.prometheus) } - /// Builds a [`Recorder`] out of this [`Builder`] and installs it with + /// Builds a [`Recorder`] out of this [`Builder`] and installs it with the /// [`metrics::set_global_recorder()`]. /// /// # Panics /// - /// If the built [`Recorder`] fails to be installed with + /// If the built [`Recorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -1146,11 +1146,11 @@ impl Builder { } /// Builds a [`FreezableRecorder`] out of this [`Builder`] and installs it - /// with [`metrics::set_global_recorder()`]. + /// with the [`metrics::set_global_recorder()`]. /// /// # Panics /// - /// If the built [`FreezableRecorder`] fails to be installed with + /// If the built [`FreezableRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -1210,7 +1210,7 @@ impl Builder { } /// Builds a [`FrozenRecorder`] out of this [`Builder`] and installs it with - /// [`metrics::set_global_recorder()`]. + /// the [`metrics::set_global_recorder()`]. /// /// Returns the [`prometheus::Registry`] backing the installed /// [`FrozenRecorder`], as there is nothing you can configure with the @@ -1218,7 +1218,7 @@ impl Builder { /// /// # Panics /// - /// If the built [`FrozenRecorder`] fails to be installed with + /// If the built [`FrozenRecorder`] fails to be installed with the /// [`metrics::set_global_recorder()`]. /// /// # Example @@ -1280,7 +1280,7 @@ impl Builder { impl Builder> { /// Adds the provided [`metrics::Layer`] to wrap the built [`Recorder`] upon - /// its installation with [`metrics::set_global_recorder()`]. + /// its installation with the [`metrics::set_global_recorder()`]. /// /// # Example ///