mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-31 08:28:34 +00:00
runtime-rs: Fix for-loops-over-fallibles
Clippy complains about: ``` error: for loop over a `&Result`. This is more readably written as an `if let` statement --> crates/hypervisor/src/firecracker/fc_api.rs:99:22 | 99 | for param in &kernel_params.to_string() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -96,7 +96,7 @@ impl FcInner {
|
||||
));
|
||||
let mut parameters = String::new().to_owned();
|
||||
|
||||
for param in &kernel_params.to_string() {
|
||||
if let Ok(param) = &kernel_params.to_string() {
|
||||
parameters.push_str(¶m.to_string());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user