From 2e6d89f0338799f382c78657039d4c6318a39228 Mon Sep 17 00:00:00 2001 From: ShootingStarDragons Date: Fri, 6 Oct 2023 10:10:53 +0800 Subject: [PATCH] chore: run clippy --- libwayshot/src/lib.rs | 2 +- libwayshot/src/screencopy.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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), })