sim: Remove useless `return`s
Apply clippy suggestions to directly result in values instead of
returning those values at the end of a function. Better matches common
Rust style.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/mcuboot-sys/src/c.rs b/sim/mcuboot-sys/src/c.rs
index 549c48a..5f518f5 100644
--- a/sim/mcuboot-sys/src/c.rs
+++ b/sim/mcuboot-sys/src/c.rs
@@ -63,7 +63,7 @@
encbuf.as_mut_ptr()) == 0 {
return Ok(encbuf);
}
- return Err("Failed to encrypt buffer");
+ Err("Failed to encrypt buffer")
}
}
@@ -73,7 +73,7 @@
if raw::kw_encrypt_(kek.as_ptr(), seckey.as_ptr(), encbuf.as_mut_ptr()) == 0 {
return Ok(encbuf);
}
- return Err("Failed to encrypt buffer");
+ Err("Failed to encrypt buffer")
}
}