Skip to content

Commit 872d205

Browse files
committed
core: take valuable Values by value
In #1881, I accidentally had the `Visit` trait take a `&Value<'_>`. This was probably wrong, since `Value` is `Copy` and should only be a couple words, one of which might be a pointer...so it's probably better to just pass the `pointer + enum descriminant` (or `integer + enum descriminant`) instead of passing `pointer to (pointer + enum descriminant)`. This probably also makes the API a little nicer.
1 parent 532b61c commit 872d205

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracing-core/src/field.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub trait Visit {
189189
/// [`valuable`]: https://docs.rs/valuable
190190
#[cfg(all(tracing_unstable, feature = "valuable"))]
191191
#[cfg_attr(docsrs, doc(cfg(all(tracing_unstable, feature = "valuable"))))]
192-
fn record_value(&mut self, field: &Field, value: &valuable::Value<'_>) {
192+
fn record_value(&mut self, field: &Field, value: valuable::Value<'_>) {
193193
self.record_debug(field, &value)
194194
}
195195

0 commit comments

Comments
 (0)