Skip to content

Commit

Permalink
Remove as_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisDISPA committed Feb 29, 2024
1 parent a8346a7 commit ce7473e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl IWICBitmapDecoder_Impl for JXLWICBitmapDecoder {
let reader = BufReader::new(stream);

let image = JxlImage::builder().read(reader).map_err(|err| {
windows::core::Error::new(WINCODEC_ERR_BADIMAGE, format!("{:?}", err).as_str())
windows::core::Error::new(WINCODEC_ERR_BADIMAGE, format!("{:?}", err))
})?;

let (width, height, _left, _top) = image.image_header().metadata.apply_orientation(
Expand Down Expand Up @@ -183,7 +183,7 @@ impl IWICBitmapDecoder_Impl for JXLWICBitmapDecoder {
}

let render = decoded.image.render_frame(index as usize).map_err(|err| {
windows::core::Error::new(WINCODEC_ERR_FRAMEMISSING, format!("{:?}", err).as_str())
windows::core::Error::new(WINCODEC_ERR_FRAMEMISSING, format!("{:?}", err))
})?;

let frame_decode = JXLWICBitmapFrameDecode::new(
Expand Down
2 changes: 1 addition & 1 deletion src/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl IInitializeWithStream_Impl for JXLPropertyStore {
let reader = BufReader::new(stream);

let image = JxlImage::builder().read(reader).map_err(|err| {
windows::core::Error::new(WINCODEC_ERR_BADIMAGE, format!("{:?}", err).as_str())
windows::core::Error::new(WINCODEC_ERR_BADIMAGE, format!("{:?}", err))
})?;

let (width, height, _left, _top) = image.image_header().metadata.apply_orientation(
Expand Down

0 comments on commit ce7473e

Please sign in to comment.