Skip to content

Commit 52e568f

Browse files
committed
lib: apply clippy fix for needless borrowing
See: https://rust-lang.github.io/rust-clippy/master/index.html#/needless_borrow Applied `cargo clippy --fix --lib -p bootc-lib` Signed-off-by: Micah Abbott <[email protected]>
1 parent 282eff6 commit 52e568f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ async fn edit(opts: EditOpts) -> Result<()> {
447447
let (booted_deployment, _deployments, host) =
448448
crate::status::get_status_require_booted(sysroot)?;
449449
let new_host: Host = if let Some(filename) = opts.filename {
450-
let mut r = std::io::BufReader::new(std::fs::File::open(&filename)?);
450+
let mut r = std::io::BufReader::new(std::fs::File::open(filename)?);
451451
serde_yaml::from_reader(&mut r)?
452452
} else {
453453
let tmpf = tempfile::NamedTempFile::new()?;

lib/src/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ async fn verify_target_fetch(imgref: &ostree_container::OstreeImageReference) ->
791791

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

0 commit comments

Comments
 (0)