From 2b6e5f822ca332d2f83a80c1bd2e4d672e1d58dd Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 18 Feb 2025 15:32:42 -0600 Subject: [PATCH] mqtt: always use 0x notation for hex in tests Fixes clippy lint for zero_prefixed_literal. --- rust/src/mqtt/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/mqtt/parser.rs b/rust/src/mqtt/parser.rs index 8b1c8c542a..9b1d6e77c3 100644 --- a/rust/src/mqtt/parser.rs +++ b/rust/src/mqtt/parser.rs @@ -885,7 +885,7 @@ mod tests { #[test] fn test_parse_publish() { let buf = [ - 0x00, 06, /* Topic Length: 6 */ + 0x00, 0x06, /* Topic Length: 6 */ 0x74, 0x6f, 0x70, 0x69, 0x63, 0x58, /* Topic: topicX */ 0x00, 0x01, /* Message Identifier: 1 */ 0x00, /* Properties 6 */ @@ -914,7 +914,7 @@ mod tests { #[test] fn test_parse_msgidonly_v3() { let buf = [ - 0x00, 01, /* Message Identifier: 1 */ + 0x00, 0x01, /* Message Identifier: 1 */ 0x74, 0x6f, 0x70, 0x69, 0x63, 0x58, 0x00, 0x61, 0x75, 0x74, 0x6f, 0x2d, 0x42, 0x34, 0x33, 0x45, 0x38, 0x30, ]; @@ -939,7 +939,7 @@ mod tests { #[test] fn test_parse_msgidonly_v5() { let buf = [ - 0x00, 01, /* Message Identifier: 1 */ + 0x00, 0x01, /* Message Identifier: 1 */ 0x00, /* Reason Code: 0 */ 0x00, /* Properties */ 0x00, 0x61, 0x75, 0x74, 0x6f, 0x2d, 0x42, 0x34, 0x33, 0x45, 0x38, 0x30, -- 2.47.2