From a9f42be8d8dc4c6f62fffe16a8099aba4c126354 Mon Sep 17 00:00:00 2001 From: rasul Date: Sun, 5 Apr 2020 15:59:51 -0500 Subject: [PATCH] Zone has From<&Zone> implemented so .into() can be used --- src/database/zones.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/database/zones.rs b/src/database/zones.rs index 9299d9d..c636091 100644 --- a/src/database/zones.rs +++ b/src/database/zones.rs @@ -12,14 +12,7 @@ use crate::world::Zone; impl Db { /// Get root zone pub fn root_zone(&self, zone: &Zone) -> RudeResult { - // get rid of the & - let mut zone = Zone { - id: zone.id, - parent: zone.parent, - name: zone.name.clone(), - users_visible: zone.users_visible, - areas: zone.areas.clone(), - }; + let mut zone: Zone = zone.into(); // loop until find the root loop {