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 {