aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/net
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-06-02 20:47:21 -0700
committerFuwn <[email protected]>2021-06-02 20:47:21 -0700
commitb21bcf823d990964d0d4b4c3a1ea6e2567280214 (patch)
treea9fd4c07a84b874368721706881e67b55d5effb6 /crates/whirl_server/src/net
parentrefactor(server): replace more matches with enums (diff)
downloadwhirl-b21bcf823d990964d0d4b4c3a1ea6e2567280214.tar.xz
whirl-b21bcf823d990964d0d4b4c3a1ea6e2567280214.zip
refactor(server): final refactoring of replacing command type constants with enum values
Diffstat (limited to 'crates/whirl_server/src/net')
-rw-r--r--crates/whirl_server/src/net/converter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/whirl_server/src/net/converter.rs b/crates/whirl_server/src/net/converter.rs
index d337d1a..1b36e78 100644
--- a/crates/whirl_server/src/net/converter.rs
+++ b/crates/whirl_server/src/net/converter.rs
@@ -5,7 +5,7 @@ use bytes::{BufMut, BytesMut};
use num_traits::AsPrimitive;
use crate::{
- cmd::constants::PROPUPD,
+ cmd::constants::Command,
net::{
constants::{PROPACCESS_POSSESS, PROPFLAG_DBSTORE},
structure::NetworkProperty,
@@ -33,7 +33,7 @@ pub fn property_list_to_bytes(
command.put_u8(property.prop_id.as_(): u8); // Property ID
// NOTE: THIS IS SUPER BAD DO NOT DO THIS! But it works!
- if command_id == PROPUPD {
+ if command_id == Command::PropUpd as i32 {
command.put_u8(PROPFLAG_DBSTORE.as_(): u8); // Flag (s)
command.put_u8(PROPACCESS_POSSESS.as_(): u8); // Access
}