From a699dd6ed21ef8216318f1d09ebea0343de7dfed Mon Sep 17 00:00:00 2001 From: dashangcun <907225865@qq.com> Date: Wed, 10 Jul 2024 23:45:18 +0900 Subject: [PATCH] chore: fix some comments (#494) Signed-off-by: dashangcun Co-authored-by: Toby Lawrence --- metrics-util/src/quantile.rs | 2 +- metrics/src/cow.rs | 2 +- metrics/src/key.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/metrics-util/src/quantile.rs b/metrics-util/src/quantile.rs index 3db07d37..f1b217a3 100644 --- a/metrics-util/src/quantile.rs +++ b/metrics-util/src/quantile.rs @@ -1,6 +1,6 @@ /// A quantile that has both the raw value and a human-friendly display label. /// -/// We work with quantiles for optimal floating-point precison over percentiles, but most of the +/// We work with quantiles for optimal floating-point precision over percentiles, but most of the /// time, monitoring systems show us percentiles, and usually in an abbreviated form: `p99`. /// /// On top of holding the quantile value, we calculate the familiar "p99" style of label, doing the diff --git a/metrics/src/cow.rs b/metrics/src/cow.rs index cb847075..2338c220 100644 --- a/metrics/src/cow.rs +++ b/metrics/src/cow.rs @@ -226,7 +226,7 @@ where // SAFETY: We only ever hold a pointer to a borrowed value of at least the lifetime of // `Self`, or an owned value which we have ownership of (albeit indirectly when using - // `Arc`), so our pointer is always valid and live for derefencing. + // `Arc`), so our pointer is always valid and live for dereferencing. unsafe { borrowed_ptr.as_ref().unwrap() } } } diff --git a/metrics/src/key.rs b/metrics/src/key.rs index 33a3685b..900a7bf9 100644 --- a/metrics/src/key.rs +++ b/metrics/src/key.rs @@ -19,7 +19,7 @@ impl KeyName { KeyName(SharedString::const_str(name)) } - /// Gets a reference to the strin used for this name. + /// Gets a reference to the string used for this name. pub fn as_str(&self) -> &str { &self.0 }