mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Use tool lints for clippy allow/deny lint attributes
This commit is contained in:
parent
cdc22ce76a
commit
a6764ba05f
10 changed files with 11 additions and 11 deletions
|
@ -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")]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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> {
|
||||
#[inline]
|
||||
pub fn num_lines(&self) -> index::Line {
|
||||
|
|
|
@ -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> {
|
||||
pub fn shrink(&mut self, cols: Column) {
|
||||
while self.len() != *cols {
|
||||
|
|
|
@ -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<f32> for Rgb {
|
|||
|
||||
|
||||
pub mod gl {
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy))]
|
||||
#![allow(clippy::all)]
|
||||
include!(concat!(env!("OUT_DIR"), "/gl_bindings.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};
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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))]
|
||||
|
||||
|
|
|
@ -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)
|
||||
};
|
||||
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue