From 9cd3c567a483c65b4dd14662c4bc3d76951d6aa8 Mon Sep 17 00:00:00 2001 From: Folyd Date: Fri, 27 Aug 2021 01:11:35 +0800 Subject: [PATCH] attributes: record `f32` and `f64` as `Value` (#1522) Companion PR with #1507. --- tracing-attributes/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tracing-attributes/src/lib.rs b/tracing-attributes/src/lib.rs index 3e095ca03f..17b13c3b3d 100644 --- a/tracing-attributes/src/lib.rs +++ b/tracing-attributes/src/lib.rs @@ -1067,7 +1067,7 @@ enum RecordType { impl RecordType { /// Array of primitive types which should be recorded as [RecordType::Value]. - const TYPES_FOR_VALUE: [&'static str; 23] = [ + const TYPES_FOR_VALUE: &'static [&'static str] = &[ "bool", "str", "u8", @@ -1078,6 +1078,8 @@ impl RecordType { "i32", "u64", "i64", + "f32", + "f64", "usize", "isize", "NonZeroU8",