Zone has From<&Zone> implemented so .into() can be used

master
rasul 5 years ago
parent a493f868d4
commit a9f42be8d8

@ -12,14 +12,7 @@ use crate::world::Zone;
impl Db {
/// Get root zone
pub fn root_zone(&self, zone: &Zone) -> RudeResult<Zone> {
// 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 {

Loading…
Cancel
Save