From a6764ba05fee785186166c0710b08eb2a5ae302c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 7 Dec 2018 14:58:11 +0100 Subject: [PATCH] Use tool lints for clippy allow/deny lint attributes --- copypasta/src/lib.rs | 2 +- font/src/lib.rs | 2 +- src/grid/mod.rs | 2 +- src/grid/row.rs | 2 +- src/lib.rs | 4 ++-- src/locale.rs | 2 +- src/logging.rs | 2 +- src/main.rs | 2 +- src/tty/unix.rs | 2 +- winpty/src/lib.rs | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/copypasta/src/lib.rs b/copypasta/src/lib.rs index cb2ebef8..796c98df 100644 --- a/copypasta/src/lib.rs +++ b/copypasta/src/lib.rs @@ -1,6 +1,6 @@ //! A cross-platform clipboard library -#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] // This has to be here due to macro_use #[cfg(target_os = "macos")] diff --git a/font/src/lib.rs b/font/src/lib.rs index 4c4f2653..6df96f28 100644 --- a/font/src/lib.rs +++ b/font/src/lib.rs @@ -18,7 +18,7 @@ //! FreeType is used on everything that's not Mac OS. //! Eventually, ClearType support will be available for windows -#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] #[cfg(not(any(target_os = "macos", windows)))] extern crate fontconfig; diff --git a/src/grid/mod.rs b/src/grid/mod.rs index 9e15bd02..b6313751 100644 --- a/src/grid/mod.rs +++ b/src/grid/mod.rs @@ -404,7 +404,7 @@ impl Grid { } } -#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))] +#[allow(clippy::len_without_is_empty)] impl Grid { #[inline] pub fn num_lines(&self) -> index::Line { diff --git a/src/grid/row.rs b/src/grid/row.rs index 7c12bf99..abfb9f93 100644 --- a/src/grid/row.rs +++ b/src/grid/row.rs @@ -71,7 +71,7 @@ impl Row { } } -#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))] +#[allow(clippy::len_without_is_empty)] impl Row { pub fn shrink(&mut self, cols: Column) { while self.len() != *cols { diff --git a/src/lib.rs b/src/lib.rs index 7ba3538b..8a75bf67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ // limitations under the License. // //! Alacritty - The GPU Enhanced Terminal -#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] #![cfg_attr(feature = "nightly", feature(core_intrinsics))] #![cfg_attr(all(test, feature = "bench"), feature(test))] @@ -127,6 +127,6 @@ impl Mul for Rgb { pub mod gl { - #![cfg_attr(feature = "cargo-clippy", allow(clippy))] + #![allow(clippy::all)] include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs")); } diff --git a/src/locale.rs b/src/locale.rs index 833de71e..81904f79 100644 --- a/src/locale.rs +++ b/src/locale.rs @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#![cfg_attr(feature = "cargo-clippy", allow(let_unit_value))] +#![allow(clippy::let_unit_value)] #![cfg(target_os = "macos")] use libc::{LC_CTYPE, setlocale}; use std::ffi::{CString, CStr}; diff --git a/src/logging.rs b/src/logging.rs index 5ad1dcd5..fd11a7bb 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -94,7 +94,7 @@ struct Logger { impl Logger { // False positive, see: https://github.com/rust-lang-nursery/rust-clippy/issues/734 - #[cfg_attr(feature = "cargo-clippy", allow(new_ret_no_self))] + #[allow(clippy::new_ret_no_self)] fn new(level: log::LevelFilter) -> Self { log::set_max_level(level); diff --git a/src/main.rs b/src/main.rs index a44c8eb3..c2a1abc3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ // limitations under the License. // //! Alacritty - The GPU Enhanced Terminal -#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] #![cfg_attr(feature = "nightly", feature(core_intrinsics))] #![cfg_attr(all(test, feature = "bench"), feature(test))] diff --git a/src/tty/unix.rs b/src/tty/unix.rs index db20f6bf..a1774d05 100644 --- a/src/tty/unix.rs +++ b/src/tty/unix.rs @@ -124,7 +124,7 @@ fn set_controlling_terminal(fd: c_int) { // based on architecture (32/64). So a generic cast is used to make sure // there are no issues. To allow such a generic cast the clippy warning // is disabled. - #[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] + #[allow(clippy::cast_lossless)] libc::ioctl(fd, TIOCSCTTY as _, 0) }; diff --git a/winpty/src/lib.rs b/winpty/src/lib.rs index 308843a9..90714c74 100644 --- a/winpty/src/lib.rs +++ b/winpty/src/lib.rs @@ -1,4 +1,4 @@ -#![cfg_attr(feature = "cargo-clippy", deny(clippy, if_not_else, enum_glob_use, wrong_pub_self_convention))] +#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use, clippy::wrong_pub_self_convention)] #[macro_use] #[cfg(windows)]