diff --git a/libwayshot/src/lib.rs b/libwayshot/src/lib.rs index 7f168b3d..2d2a4200 100644 --- a/libwayshot/src/lib.rs +++ b/libwayshot/src/lib.rs @@ -459,7 +459,7 @@ impl WayshotConnection { output_info.transform, None, )?; - Ok((&frame_copy).try_into()?) + (&frame_copy).try_into() } /// Take a screenshot from all of the specified outputs. diff --git a/libwayshot/src/screencopy.rs b/libwayshot/src/screencopy.rs index 618fbe8e..8ad59433 100644 --- a/libwayshot/src/screencopy.rs +++ b/libwayshot/src/screencopy.rs @@ -52,7 +52,7 @@ impl TryFrom<&FrameCopy> for RgbaImage { fn try_from(value: &FrameCopy) -> Result { Ok(match value.frame_color_type { ColorType::Rgb8 | ColorType::Rgba8 => { - create_image_buffer(&value.frame_format, &value.frame_mmap)?.into() + create_image_buffer(&value.frame_format, &value.frame_mmap)? } _ => return Err(Error::InvalidColor), })