From bb1f73a755753221159eb247553b5b4d0c9c9042 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Thu, 22 Jul 2021 18:53:22 +0700 Subject: [PATCH] Change character byte definitions into b'X' form --- src/link/mod.rs | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/link/mod.rs b/src/link/mod.rs index b761827..87d8533 100644 --- a/src/link/mod.rs +++ b/src/link/mod.rs @@ -172,27 +172,27 @@ fn message_push_byte() { reader.push_byte(0).unwrap(); reader.push_byte(0).unwrap(); reader.push_byte(13).unwrap(); - reader.push_byte(0x48).unwrap(); // H - reader.push_byte(0x65).unwrap(); // e - reader.push_byte(0x6c).unwrap(); // l - reader.push_byte(0x6c).unwrap(); // l - reader.push_byte(0x6f).unwrap(); // o - reader.push_byte(0x2c).unwrap(); // , - reader.push_byte(0x20).unwrap(); // - reader.push_byte(0x77).unwrap(); // w - reader.push_byte(0x6f).unwrap(); // o - reader.push_byte(0x72).unwrap(); // r - reader.push_byte(0x6c).unwrap(); // l - reader.push_byte(0x64).unwrap(); // d - reader.push_byte(0x21).unwrap(); // + reader.push_byte(b'H').unwrap(); + reader.push_byte(b'e').unwrap(); + reader.push_byte(b'l').unwrap(); + reader.push_byte(b'l').unwrap(); + reader.push_byte(b'o').unwrap(); + reader.push_byte(b',').unwrap(); + reader.push_byte(b' ').unwrap(); + reader.push_byte(b'w').unwrap(); + reader.push_byte(b'o').unwrap(); + reader.push_byte(b'r').unwrap(); + reader.push_byte(b'l').unwrap(); + reader.push_byte(b'd').unwrap(); + reader.push_byte(b'!').unwrap(); reader.push_byte(HEAD_UE_MESSAGE).unwrap(); reader.push_byte(0).unwrap(); reader.push_byte(0).unwrap(); reader.push_byte(0).unwrap(); reader.push_byte(3).unwrap(); - reader.push_byte(0x59).unwrap(); // Y - reader.push_byte(0x6f).unwrap(); // o - reader.push_byte(0x21).unwrap(); // + reader.push_byte(b'Y').unwrap(); + reader.push_byte(b'o').unwrap(); + reader.push_byte(b'!').unwrap(); assert_eq!(reader.pop().unwrap(), "Hello, world!"); assert_eq!(reader.pop().unwrap(), "Yo!"); assert_eq!(reader.pop(), None); @@ -233,9 +233,9 @@ fn mixed_push_byte() { reader.push_byte(0).unwrap(); reader.push_byte(0).unwrap(); reader.push_byte(3).unwrap(); - reader.push_byte(0x59).unwrap(); // Y - reader.push_byte(0x6f).unwrap(); // o - reader.push_byte(0x21).unwrap(); // + reader.push_byte(b'Y').unwrap(); + reader.push_byte(b'o').unwrap(); + reader.push_byte(b'!').unwrap(); reader.push_byte(HEAD_UE_RECEIVED).unwrap(); reader.push_byte(65).unwrap(); reader.push_byte(25).unwrap(); @@ -261,9 +261,9 @@ fn pushing_many_bytes_at_once() { 0, 0, 3, - 0x59, // Y - 0x6f, // o - 0x21, // + b'Y', + b'o', + b'!', HEAD_UE_RECEIVED, 65, 25,