Skip to content

Commit

Permalink
lib: apply clippy fix for needless borrowing
Browse files Browse the repository at this point in the history
See: https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow

Applied `cargo clippy --fix --lib -p bootc-lib`
  • Loading branch information
miabbott committed Nov 10, 2023
1 parent 282eff6 commit 60e7f12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async fn edit(opts: EditOpts) -> Result<()> {
let (booted_deployment, _deployments, host) =
crate::status::get_status_require_booted(sysroot)?;
let new_host: Host = if let Some(filename) = opts.filename {
let mut r = std::io::BufReader::new(std::fs::File::open(&filename)?);
let mut r = std::io::BufReader::new(std::fs::File::open(filename)?);
serde_yaml::from_reader(&mut r)?
} else {
let tmpf = tempfile::NamedTempFile::new()?;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ async fn verify_target_fetch(imgref: &ostree_container::OstreeImageReference) ->

tracing::trace!("Verifying fetch for {imgref}");
let mut imp =
ostree_container::store::ImageImporter::new(&tmprepo, imgref, Default::default()).await?;
ostree_container::store::ImageImporter::new(tmprepo, imgref, Default::default()).await?;
use ostree_container::store::PrepareResult;
let prep = match imp.prepare().await? {
// SAFETY: It's impossible that the image was already fetched into this newly created temporary repository
Expand Down

0 comments on commit 60e7f12

Please sign in to comment.