From deb09d8c3c33651e54ee66259bf9f8847497bf07 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 4 Jun 2024 12:24:51 -0700 Subject: [PATCH] rename FoundIn::{value -> as_str} --- src/observability.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/observability.rs b/src/observability.rs index e1e681ef..5e9f2d2d 100644 --- a/src/observability.rs +++ b/src/observability.rs @@ -55,7 +55,7 @@ pub(crate) enum FoundIn { impl FoundIn { /// Returns a stringified representation of the current value - fn value(&self) -> &'static str { + fn as_str(&self) -> &'static str { match self { FoundIn::Cache => "hit", FoundIn::Database => "miss-database", @@ -67,7 +67,7 @@ impl FoundIn { /// Record the current value to the current [`tracing::Span`] // TODO: use tracing::Value instead if it ever becomes accessible pub(crate) fn record(&self, field: &str) { - tracing::Span::current().record(field, self.value()); + tracing::Span::current().record(field, self.as_str()); } }