From f816e53c2b75e9276bb9767c6e5c0b4f77b302ed Mon Sep 17 00:00:00 2001 From: Amy Parker Date: Mon, 2 Jan 2023 11:20:25 -0800 Subject: [PATCH] ignore style warnings in libs/scrap Constant `is_cursor_embedded` does not follow the Rust standard stylistic convention of upper-case global variables and constants. This causes two warnings to be thrown when compiling (tested on Arch Linux, commit = 68fda34, Rust = 1.66.0), one each for the Wayland and X11 common modules. Since these variables are not new, their names should not be modified; to remove the warnings, this patch allows non-style-conforming names on these two constant declarations specifically, suppressing the warnings. It does not affect stylistic warnings on any other code within the project. Signed-off-by: Amy Parker Cc: fufesou --- libs/scrap/src/common/wayland.rs | 1 + libs/scrap/src/common/x11.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/libs/scrap/src/common/wayland.rs b/libs/scrap/src/common/wayland.rs index 99752fa7f..e9a846602 100644 --- a/libs/scrap/src/common/wayland.rs +++ b/libs/scrap/src/common/wayland.rs @@ -4,6 +4,7 @@ use std::{io, sync::RwLock, time::Duration}; pub struct Capturer(Display, Box, bool, Vec); +#[allow(non_upper_case_globals)] pub const is_cursor_embedded: bool = true; lazy_static::lazy_static! { diff --git a/libs/scrap/src/common/x11.rs b/libs/scrap/src/common/x11.rs index 138ab5000..a8359498b 100644 --- a/libs/scrap/src/common/x11.rs +++ b/libs/scrap/src/common/x11.rs @@ -3,6 +3,7 @@ use std::{io, ops, time::Duration}; pub struct Capturer(x11::Capturer); +#[allow(non_upper_case_globals)] pub const is_cursor_embedded: bool = false; impl Capturer {