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.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/world/src/main.rs b/world/src/main.rs
index 695b4aa..1a75a61 100644
--- a/world/src/main.rs
+++ b/world/src/main.rs
@@ -185,11 +185,7 @@ fn main() -> Result<()> {
.reader(|buf| Some(&buffers[buf.index()]))
.read_inverse_bind_matrices();
for (j_ind, j) in skin.joints().enumerate() {
- let ibm = if let Some(x) = &mut inverse_bind_mat {
- Some(x.next().unwrap())
- } else {
- None
- };
+ let ibm = inverse_bind_mat.as_mut().map(|x| x.next().unwrap());
let a_ind = match joint_index_to_arm_index.get(&j.index()) {
Some(i) => *i,
None => {
@@ -220,7 +216,7 @@ fn main() -> Result<()> {
.enumerate()
.map(|(i, p)| {
p.and_then(|i| joint_index_to_arm_index.get(&i).copied())
- .unwrap_or_else(|| i) as u16
+ .unwrap_or(i) as u16
})
.collect::<Vec<_>>();