Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Commit

Permalink
lib/container: Drop unnecessary mut for proxy
Browse files Browse the repository at this point in the history
The proxy has gone back to a shared borrow with internal locking.
  • Loading branch information
cgwalters committed Nov 10, 2021
1 parent b924e1e commit 52ac354
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/container/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn manifest_digest_from_commit(commit: &glib::Variant) -> Result<String> {
impl LayeredImageImporter {
/// Create a new importer.
pub async fn new(repo: &ostree::Repo, imgref: &OstreeImageReference) -> Result<Self> {
let mut proxy = ImageProxy::new().await?;
let proxy = ImageProxy::new().await?;
let proxy_img = proxy.open_image(&imgref.imgref.to_string()).await?;
let repo = repo.clone();
Ok(LayeredImageImporter {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/container/unencapsulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<T: AsyncRead> AsyncRead for ProgressReader<T> {
pub async fn fetch_manifest(
imgref: &OstreeImageReference,
) -> Result<(oci_spec::image::ImageManifest, String)> {
let mut proxy = ImageProxy::new().await?;
let proxy = ImageProxy::new().await?;
let oi = &proxy.open_image(&imgref.imgref.to_string()).await?;
let (digest, raw_manifest) = proxy.fetch_manifest(oi).await?;
proxy.close_image(oi).await?;
Expand Down

0 comments on commit 52ac354

Please sign in to comment.