mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
rename FoundIn::{value -> as_str}
This commit is contained in:
parent
b2d6810f35
commit
deb09d8c3c
1 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ pub(crate) enum FoundIn {
|
||||||
|
|
||||||
impl FoundIn {
|
impl FoundIn {
|
||||||
/// Returns a stringified representation of the current value
|
/// Returns a stringified representation of the current value
|
||||||
fn value(&self) -> &'static str {
|
fn as_str(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
FoundIn::Cache => "hit",
|
FoundIn::Cache => "hit",
|
||||||
FoundIn::Database => "miss-database",
|
FoundIn::Database => "miss-database",
|
||||||
|
|
@ -67,7 +67,7 @@ impl FoundIn {
|
||||||
/// Record the current value to the current [`tracing::Span`]
|
/// Record the current value to the current [`tracing::Span`]
|
||||||
// TODO: use tracing::Value instead if it ever becomes accessible
|
// TODO: use tracing::Value instead if it ever becomes accessible
|
||||||
pub(crate) fn record(&self, field: &str) {
|
pub(crate) fn record(&self, field: &str) {
|
||||||
tracing::Span::current().record(field, self.value());
|
tracing::Span::current().record(field, self.as_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue