From c864a9554a09e16098935c103eaf322f84a3d246 Mon Sep 17 00:00:00 2001 From: Bazyli Cyran Date: Fri, 1 Mar 2024 20:37:48 +0100 Subject: [PATCH] refactor: Remove unnecessary Box --- src/heif/read.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/heif/read.rs b/src/heif/read.rs index 853ebb1..834e499 100644 --- a/src/heif/read.rs +++ b/src/heif/read.rs @@ -21,7 +21,7 @@ pub fn validate_file>(path: P) -> Result<()> { } /// Extract XMP metadata bytes from HEIF image. -pub fn get_xmp_metadata(heif_ctx: &HeifContext) -> Result> { +pub fn get_xmp_metadata(heif_ctx: &HeifContext) -> Result> { let primary_image_handle = heif_ctx.primary_image_handle()?; let mut metadata_ids: [ItemId; 1] = [0]; @@ -35,7 +35,7 @@ pub fn get_xmp_metadata(heif_ctx: &HeifContext) -> Result> { let xmp_metadata = primary_image_handle.metadata(xmp_metadata_id)?; debug!("XMP metadata read"); - Ok(xmp_metadata.into_boxed_slice()) + Ok(xmp_metadata) } /// Get all available top level image handles from HEIF.