aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-01 00:18:21 +0000
committerFuwn <[email protected]>2021-07-01 00:18:21 +0000
commitd525b597464104ba77781430743d0d087736ce6b (patch)
tree3b43cfe0980432bec1a5841f299cfeb72912a4c1 /crates
parentchore(global): remove unused `license-file` manifest keys (diff)
downloadwhirl-d525b597464104ba77781430743d0d087736ce6b.tar.xz
whirl-d525b597464104ba77781430743d0d087736ce6b.zip
refactor(whirl_server): implement `Clone` for `PropertyList`
The following commits will require `PropertyList` to be cloneable, this enables that.
Diffstat (limited to 'crates')
-rw-r--r--crates/whirl_server/src/net/network_property.rs1
-rw-r--r--crates/whirl_server/src/net/property_list.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/whirl_server/src/net/network_property.rs b/crates/whirl_server/src/net/network_property.rs
index 55800a0..c8d9046 100644
--- a/crates/whirl_server/src/net/network_property.rs
+++ b/crates/whirl_server/src/net/network_property.rs
@@ -1,6 +1,7 @@
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only
+#[derive(Clone)]
pub struct NetworkProperty {
pub prop_id: i32,
pub value: String,
diff --git a/crates/whirl_server/src/net/property_list.rs b/crates/whirl_server/src/net/property_list.rs
index 2c52132..a1c4b34 100644
--- a/crates/whirl_server/src/net/property_list.rs
+++ b/crates/whirl_server/src/net/property_list.rs
@@ -12,6 +12,7 @@ use crate::{
},
};
+#[derive(Clone)]
pub struct PropertyList(pub Vec<crate::net::network_property::NetworkProperty>);
impl PropertyList {
/// Convert a `PropertyList` to a ready-to-be sent command.