Skip to content

Commit

Permalink
core: add support for recording 128-bit ints (signed and unsigned)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Jun 17, 2022
1 parent 68bc91f commit cd5ba78
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tracing-core/src/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,16 @@ pub trait Visit {
self.record_debug(field, &value)
}

/// Visit a signed 128-bit integer value.
fn record_i128(&mut self, field: &Field, value: i128) {
self.record_debug(field, &value)
}

/// Visit an unsigned 128-bit integer value.
fn record_u128(&mut self, field: &Field, value: u128) {
self.record_debug(field, &value)
}

/// Visit a boolean value.
fn record_bool(&mut self, field: &Field, value: bool) {
self.record_debug(field, &value)
Expand Down Expand Up @@ -393,6 +403,8 @@ impl_values! {
record_u64(usize, u32, u16, u8 as u64),
record_i64(i64),
record_i64(isize, i32, i16, i8 as i64),
record_u128(u128),
record_i128(i128),
record_bool(bool),
record_f64(f64, f32 as f64)
}
Expand Down

0 comments on commit cd5ba78

Please sign in to comment.