diff options
| author | Fuwn <[email protected]> | 2024-06-03 14:57:47 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-03 14:57:47 -0700 |
| commit | a6b766541ae58053ae705e0559d1a1ae8212634b (patch) | |
| tree | aeb55206e77679b2f5e1f47fae7f1bda5c6df5b9 /crates/whirl_server/src/cmd/commands/text.rs | |
| parent | Merge pull request #153 from Whirlsplash/renovate/actions-checkout-3.x (diff) | |
| download | whirl-old.tar.xz whirl-old.zip | |
fix: bump rust and update accordinglyold
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 |