From b036a5e7bc312148fdc782db79f56f1e3fc8b096 Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Wed, 13 Mar 2019 13:50:26 -0700 Subject: [PATCH] Implement Default for snapshot reconciler structs --- server/src/path_map.rs | 6 ++++++ server/src/snapshot_reconciler.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/server/src/path_map.rs b/server/src/path_map.rs index d944541e..8df2d83a 100644 --- a/server/src/path_map.rs +++ b/server/src/path_map.rs @@ -20,6 +20,12 @@ pub struct PathMap { nodes: HashMap>, } +impl Default for PathMap { + fn default() -> Self { + Self::new() + } +} + impl PathMap { pub fn new() -> PathMap { PathMap { diff --git a/server/src/snapshot_reconciler.rs b/server/src/snapshot_reconciler.rs index 42024ecb..2b52ca52 100644 --- a/server/src/snapshot_reconciler.rs +++ b/server/src/snapshot_reconciler.rs @@ -64,7 +64,7 @@ impl InstanceChanges { /// A lightweight, hierarchical representation of an instance that can be /// applied to the tree. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)] pub struct RbxSnapshotInstance<'a> { pub name: Cow<'a, str>, pub class_name: Cow<'a, str>,