mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
rename FoundIn::{value -> as_str}
This commit is contained in:
parent
22dd7f1a54
commit
38382128ac
1 changed files with 2 additions and 2 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue