Use tool lints for clippy allow/deny lint attributes

This commit is contained in:
Matthias Krüger 2018-12-07 14:58:11 +01:00 committed by Christian Duerr
parent cdc22ce76a
commit a6764ba05f
10 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
//! A cross-platform clipboard library //! 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 // This has to be here due to macro_use
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]

View File

@ -18,7 +18,7 @@
//! FreeType is used on everything that's not Mac OS. //! FreeType is used on everything that's not Mac OS.
//! Eventually, ClearType support will be available for windows //! 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)))] #[cfg(not(any(target_os = "macos", windows)))]
extern crate fontconfig; extern crate fontconfig;

View File

@ -404,7 +404,7 @@ impl<T: Copy + Clone> Grid<T> {
} }
} }
#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))] #[allow(clippy::len_without_is_empty)]
impl<T> Grid<T> { impl<T> Grid<T> {
#[inline] #[inline]
pub fn num_lines(&self) -> index::Line { pub fn num_lines(&self) -> index::Line {

View File

@ -71,7 +71,7 @@ impl<T: Copy + Clone> Row<T> {
} }
} }
#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))] #[allow(clippy::len_without_is_empty)]
impl<T> Row<T> { impl<T> Row<T> {
pub fn shrink(&mut self, cols: Column) { pub fn shrink(&mut self, cols: Column) {
while self.len() != *cols { while self.len() != *cols {

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
// //
//! Alacritty - The GPU Enhanced Terminal //! 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(feature = "nightly", feature(core_intrinsics))]
#![cfg_attr(all(test, feature = "bench"), feature(test))] #![cfg_attr(all(test, feature = "bench"), feature(test))]
@ -127,6 +127,6 @@ impl Mul<f32> for Rgb {
pub mod gl { pub mod gl {
#![cfg_attr(feature = "cargo-clippy", allow(clippy))] #![allow(clippy::all)]
include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs")); include!(concat!(env!("OUT_DIR"), "/gl_bindings.rs"));
} }

View File

@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#![cfg_attr(feature = "cargo-clippy", allow(let_unit_value))] #![allow(clippy::let_unit_value)]
#![cfg(target_os = "macos")] #![cfg(target_os = "macos")]
use libc::{LC_CTYPE, setlocale}; use libc::{LC_CTYPE, setlocale};
use std::ffi::{CString, CStr}; use std::ffi::{CString, CStr};

View File

@ -94,7 +94,7 @@ struct Logger {
impl Logger { impl Logger {
// False positive, see: https://github.com/rust-lang-nursery/rust-clippy/issues/734 // 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 { fn new(level: log::LevelFilter) -> Self {
log::set_max_level(level); log::set_max_level(level);

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
// //
//! Alacritty - The GPU Enhanced Terminal //! 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(feature = "nightly", feature(core_intrinsics))]
#![cfg_attr(all(test, feature = "bench"), feature(test))] #![cfg_attr(all(test, feature = "bench"), feature(test))]

View File

@ -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 // 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 // there are no issues. To allow such a generic cast the clippy warning
// is disabled. // is disabled.
#[cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] #[allow(clippy::cast_lossless)]
libc::ioctl(fd, TIOCSCTTY as _, 0) libc::ioctl(fd, TIOCSCTTY as _, 0)
}; };

View File

@ -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] #[macro_use]
#[cfg(windows)] #[cfg(windows)]