summaryrefslogtreecommitdiff
path: root/world/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'world/src/main.rs')
-rw-r--r--world/src/main.rs20
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()?;
}
}
_ => (),