aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/packet_parser.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-23 13:51:20 +0000
committerFuwn <[email protected]>2021-05-23 13:51:20 +0000
commit59cd17d4b5b1eff2847a954012eb916db4ef5116 (patch)
tree4074d9935949a48c64fdaa8503ae9ddc61e7678e /crates/whirl_server/src/packet_parser.rs
parentbuild(cargo): create a fast builds configuration for cargo (diff)
downloadwhirl-59cd17d4b5b1eff2847a954012eb916db4ef5116.tar.xz
whirl-59cd17d4b5b1eff2847a954012eb916db4ef5116.zip
docs(global): add new documentation
Diffstat (limited to 'crates/whirl_server/src/packet_parser.rs')
-rw-r--r--crates/whirl_server/src/packet_parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/whirl_server/src/packet_parser.rs b/crates/whirl_server/src/packet_parser.rs
index bfeba9e..79293cb 100644
--- a/crates/whirl_server/src/packet_parser.rs
+++ b/crates/whirl_server/src/packet_parser.rs
@@ -3,13 +3,13 @@
use bytes::BytesMut;
-/// Read all commands from the given buffer.
+/// Read all commands from the given `buffer`.
///
/// # Process
-/// 1. Get a command from `buffer` based on first byte.
+/// 1. Read a command from `buffer` based on it's first byte.
/// 2. Push command to `commands`.
/// 3. Remove command from `buffer`.
-/// 4. Iterate and do this for all commands within `buffer`.
+/// 4. Iterate and do this for the remaining commands within `buffer`.
pub fn parse_commands_from_packet(mut buffer: BytesMut) -> Vec<BytesMut> {
let mut commands: Vec<BytesMut> = Vec::new();
trace!("initial buffer: {:?}, length: {}", buffer, buffer.len());