Skip to content

Commit

Permalink
Merge pull request #277 from jeckersb/clippy-nits
Browse files Browse the repository at this point in the history
Fix a couple of clippy nits
  • Loading branch information
cgwalters authored Jan 23, 2024
2 parents 1e9c282 + 3f2272a commit b62f6a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ pub(crate) fn switch_origin_inplace(root: &Dir, imgref: &ImageReference) -> Resu
deploydir
.atomic_write(&origin_path, serialized_origin.as_bytes())
.context("Writing origin")?;
return Ok(newest_deployment);
Ok(newest_deployment)
}

#[test]
Expand Down
6 changes: 2 additions & 4 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1099,10 +1099,8 @@ pub(crate) async fn install_to_disk(opts: InstallToDiskOpts) -> Result<()> {
let loopback_dev = crate::blockdev::LoopbackDevice::new(block_opts.device.as_std_path())?;
block_opts.device = loopback_dev.path().into();
loopback = Some(loopback_dev);
} else {
if !target_blockdev_meta.file_type().is_block_device() {
anyhow::bail!("Not a block device: {}", block_opts.device);
}
} else if !target_blockdev_meta.file_type().is_block_device() {
anyhow::bail!("Not a block device: {}", block_opts.device);
}
let state = prepare_install(opts.config_opts, opts.source_opts, opts.target_opts).await?;

Expand Down

0 comments on commit b62f6a5

Please sign in to comment.