fix: clippy

This commit is contained in:
Nova
2022-10-21 06:21:49 -04:00
parent b189a6a73c
commit a572b215b9
9 changed files with 79 additions and 43 deletions

View File

@@ -18,7 +18,7 @@ use std::sync::{Arc, Weak};
static ZONEABLE_REGISTRY: Registry<Spatial> = Registry::new();
pub struct Spatial {
pub(self) uid: String,
uid: String,
pub(super) node: Weak<Node>,
parent: Mutex<Option<Arc<Spatial>>>,
pub(self) old_parent: Mutex<Option<Arc<Spatial>>>,
@@ -296,10 +296,9 @@ pub fn find_spatial(
node_name: &'static str,
node_path: &str,
) -> anyhow::Result<Arc<Spatial>> {
Ok(calling_client
calling_client
.get_node(node_name, node_path)?
.get_aspect(node_name, "spatial", |n| &n.spatial)?
.clone())
.get_aspect(node_name, "spatial", |n| &n.spatial)
}
pub fn find_spatial_parent(
calling_client: &Arc<Client>,

View File

@@ -111,7 +111,7 @@ impl Zone {
self_zone_distance < 0.0 && spatial_zone_distance > self_zone_distance
})
.map(|zoneable| {
let alias = Alias::new(
let alias = Alias::create(
&zone_client,
zone_node.get_path(),
&zoneable.uid,