Skip to content

Commit

Permalink
Make use of lint reasons and #[expect]
Browse files Browse the repository at this point in the history
  • Loading branch information
RealKC committed Dec 3, 2024
1 parent e5302fc commit 8ca99af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion kcshot-screenshot/src/wayland.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#![allow(clippy::unnecessary_wraps /*, reason = "The point of the wraps is to keep a consistent interface between xorg and wayland implementations" */)]
#![expect(
clippy::unnecessary_wraps,
reason = "The point of the wraps is to keep a consistent interface between xorg and wayland implementations"
)]

use cairo::ImageSurface;
use gtk4::{
Expand Down
5 changes: 4 additions & 1 deletion kcshot-screenshot/src/xorg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ fn overlay_cursor(cursor: xfixes::GetCursorImageReply, screenshot: &mut [u8], bo
let h_draw = usize::min(h, bounds.h as usize - cy);

for x in 0..w_draw {
#[allow(clippy::identity_op /*, reason = "Identity ops add a symmetry that makes the code nicer and easier to read." */)]
#[expect(
clippy::identity_op,
reason = "Identity ops add a symmetry that makes the code nicer and easier to read."
)]
for y in 0..h_draw {
let r = cursor[y * w + x] >> 0 & 0xff;
let g = cursor[y * w + x] >> 8 & 0xff;
Expand Down
2 changes: 1 addition & 1 deletion src/db/schema.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(unused_qualifications /*, reason = "Macro generated code" */)]
#![expect(unused_qualifications, reason = "Macro generated code")]

table! {
screenshots (id) {
Expand Down

0 comments on commit 8ca99af

Please sign in to comment.