Skip to content

Commit 3f2272a

Browse files
committed
Fix a couple of clippy nits
Signed-off-by: John Eckersberg <[email protected]>
1 parent 1e9c282 commit 3f2272a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/src/deploy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ pub(crate) fn switch_origin_inplace(root: &Dir, imgref: &ImageReference) -> Resu
310310
deploydir
311311
.atomic_write(&origin_path, serialized_origin.as_bytes())
312312
.context("Writing origin")?;
313-
return Ok(newest_deployment);
313+
Ok(newest_deployment)
314314
}
315315

316316
#[test]

lib/src/install.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,10 +1099,8 @@ pub(crate) async fn install_to_disk(opts: InstallToDiskOpts) -> Result<()> {
10991099
let loopback_dev = crate::blockdev::LoopbackDevice::new(block_opts.device.as_std_path())?;
11001100
block_opts.device = loopback_dev.path().into();
11011101
loopback = Some(loopback_dev);
1102-
} else {
1103-
if !target_blockdev_meta.file_type().is_block_device() {
1104-
anyhow::bail!("Not a block device: {}", block_opts.device);
1105-
}
1102+
} else if !target_blockdev_meta.file_type().is_block_device() {
1103+
anyhow::bail!("Not a block device: {}", block_opts.device);
11061104
}
11071105
let state = prepare_install(opts.config_opts, opts.source_opts, opts.target_opts).await?;
11081106

0 commit comments

Comments
 (0)