refactor: add more clippy lints to "Compile-time / optimization" section (#875)

This commit is contained in:
Alex Yusiuk
2025-07-21 12:28:33 -04:00
committed by GitHub
parent 5484b11fbd
commit aa82dfb1fd
37 changed files with 47 additions and 38 deletions
+4
View File
@@ -115,8 +115,12 @@ range_plus_one = "warn"
# TODO: partial_pub_fields = "warn" (should we enable only in pdu crates?)
# == Compile-time / optimization == #
doc_include_without_cfg = "warn"
inline_always = "warn"
large_include_file = "warn"
or_fun_call = "warn"
rc_buffer = "warn"
string_lit_chars_any = "warn"
unnecessary_box_returns = "warn"
# == Extra-pedantic clippy == #
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
mod clipboard;
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[macro_use]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
use bitflags::bitflags;
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[macro_use]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[macro_use]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![allow(unused_crate_dependencies)] // false positives because there is both a library and a binary
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
pub mod bitmap;
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![warn(unsafe_op_in_unsafe_fn)]
#![warn(invalid_reference_casting)]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![allow(clippy::arithmetic_side_effects)] // FIXME: remove
#![allow(clippy::cast_lossless)] // FIXME: remove
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[macro_use]
+2 -2
View File
@@ -1,9 +1,9 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(clippy::std_instead_of_alloc)]
#![warn(clippy::std_instead_of_core)]
#![warn(missing_docs)]
#![cfg_attr(doc, warn(missing_docs))]
#[cfg(feature = "alloc")]
extern crate alloc;
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
pub const CHANNEL_NAME: &str = "Microsoft::Windows::RDS::DisplayControl";
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[macro_use]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![cfg_attr(not(feature = "std"), no_std)]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![cfg_attr(not(feature = "std"), no_std)]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#[rustfmt::skip] // do not re-order this pub use
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(
html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg"
)]
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
#![allow(clippy::arithmetic_side_effects)] // FIXME: remove
#![allow(clippy::cast_lossless)] // FIXME: remove
+1 -1
View File
@@ -1,4 +1,4 @@
#![doc = include_str!("../README.md")]
#![cfg_attr(doc, doc = include_str!("../README.md"))]
#![doc(html_logo_url = "https://cdnweb.devolutions.net/images/projects/devolutions/logos/devolutions-icon-shadow.svg")]
use std::collections::BTreeSet;

Some files were not shown because too many files have changed in this diff Show More