Skip to content

Commit

Permalink
chore: make clippy happy (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers authored Mar 28, 2024
1 parent 7381159 commit 2cb242c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libwayshot/src/image_util.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use image::{DynamicImage, GenericImageView};
use image::DynamicImage;
use wayland_client::protocol::wl_output::Transform;

use crate::region::Size;
Expand All @@ -12,7 +12,7 @@ pub(crate) fn rotate_image_buffer(
) -> DynamicImage {
// TODO Better document whether width and height are before or after the transform.
// Perhaps this should be part of a cleanup of the FrameCopy struct.
let (logical_width, logical_height) = match transform {
let (logical_width, _logical_height) = match transform {
Transform::_90 | Transform::_270 | Transform::Flipped90 | Transform::Flipped270 => {
(logical_size.height, logical_size.width)
}
Expand Down
2 changes: 1 addition & 1 deletion libwayshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use crate::{
convert::create_converter,
dispatch::{CaptureFrameState, FrameState, OutputCaptureState, WayshotState},
output::OutputInfo,
region::{LogicalRegion, Region, Size},
region::{LogicalRegion, Size},
screencopy::{create_shm_fd, FrameCopy, FrameFormat},
};

Expand Down
2 changes: 2 additions & 0 deletions wayshot/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn main() -> Result<()> {
let output = OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(Path::new(&man_page.1))?;
_ = Command::new("scdoc")
.stdin(Stdio::from(File::open(man_page.0)?))
Expand All @@ -41,6 +42,7 @@ fn main() -> Result<()> {
let output = OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(Path::new(&scdoc_output.1))?;
let mut encoder = GzEncoder::new(output, Compression::default());
copy(&mut input, &mut encoder)?;
Expand Down
1 change: 0 additions & 1 deletion wayshot/src/wayshot.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
fs::File,
io::{stdout, BufWriter, Cursor, Write},
process::Command,
};
Expand Down

0 comments on commit 2cb242c

Please sign in to comment.