diff options
Diffstat (limited to 'crates/whirl_server/src/cmd/commands/text.rs')
| -rw-r--r-- | crates/whirl_server/src/cmd/commands/text.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/whirl_server/src/cmd/commands/text.rs b/crates/whirl_server/src/cmd/commands/text.rs index 056d7d6..9a36521 100644 --- a/crates/whirl_server/src/cmd/commands/text.rs +++ b/crates/whirl_server/src/cmd/commands/text.rs @@ -4,7 +4,6 @@ use std::str::from_utf8; use bytes::{BufMut, BytesMut}; -use num_traits::AsPrimitive; use crate::cmd::{ constants::Command, @@ -30,14 +29,14 @@ impl Creatable for Text { // The below byte is suspected to be the sender's short ObjId. command.put_i8(0x00); - command.put_u8(self.sender.len().as_(): u8); + command.put_u8(self.sender.len() as u8); command.put_slice(self.sender.as_bytes()); - command.put_u8(self.content.len().as_(): u8); + command.put_u8(self.content.len() as u8); command.put_slice(self.content.as_bytes()); // Convert to vector and insert the length let mut command_as_vec = command.to_vec(); - command_as_vec.insert(0, command.len().as_(): u8 + 1); + command_as_vec.insert(0, command.len() as u8 + 1); // Return bytes command_as_vec |