diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-27 15:26:00 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-27 15:26:00 +0100 |
commit | c121d94f0b27bc04ffbdca55cd0939c1401d5a2e (patch) | |
tree | 67ac9da1f994c24b9a3e8e8d2adc2e334d2e34a5 /world/src/main.rs | |
parent | 6b5c44d58e6c6d3df360396a0897290fc603699b (diff) | |
download | weareserver-c121d94f0b27bc04ffbdca55cd0939c1401d5a2e.tar weareserver-c121d94f0b27bc04ffbdca55cd0939c1401d5a2e.tar.bz2 weareserver-c121d94f0b27bc04ffbdca55cd0939c1401d5a2e.tar.zst |
clippy: fixes and ignores
Diffstat (limited to 'world/src/main.rs')
-rw-r--r-- | world/src/main.rs | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/world/src/main.rs b/world/src/main.rs index d46f4d1..c65342f 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -15,6 +15,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ #![feature(iter_array_chunks)] +#![allow(clippy::too_many_arguments, clippy::type_complexity)] pub mod mesh; pub mod physics; @@ -181,7 +182,7 @@ fn main() -> Result<()> { &buffers, &store, path_base, - &node, + node, &mut prefab, &args, &texture_cache, @@ -209,7 +210,7 @@ fn main() -> Result<()> { })?, )); } - import_physics(&gltf, *trans, &node, &mut prefab, &store, &buffers)?; + import_physics(&gltf, *trans, node, &mut prefab, &store, &buffers)?; Ok::<_, anyhow::Error>(prefab) }) .reduce( @@ -237,8 +238,7 @@ fn main() -> Result<()> { prefab.name = args.name.clone().or(gltf .default_scene() - .map(|n| n.name()) - .flatten() + .and_then(|n| n.name()) .map(|n| n.to_owned())); if args.debug_light { @@ -285,7 +285,7 @@ fn main() -> Result<()> { } if args.spin { - let ob = obs[0].clone(); + let ob = obs[0]; let mut sock2 = sock.try_clone().unwrap(); thread::spawn(move || { let mut x = 0.; @@ -321,12 +321,10 @@ fn main() -> Result<()> { } } Packet::Add(ob_a, _) => { - if args.clear { - if !obs.contains(&ob_a) { - info!("removing object {ob_a}"); - Packet::Remove(ob_a).write(&mut sock)?; - sock.flush()?; - } + if args.clear && !obs.contains(&ob_a) { + info!("removing object {ob_a}"); + Packet::Remove(ob_a).write(&mut sock)?; + sock.flush()?; } } _ => (), |