summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-12-07 14:58:11 +0100
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-12-07 13:58:11 +0000
commita6764ba05fee785186166c0710b08eb2a5ae302c (patch)
treea892e58d33619d142a89c874884875a159db94ee /src
parentcdc22ce76a8b191bfe9dbd1ef55e24ef37ac001d (diff)
Use tool lints for clippy allow/deny lint attributes
Diffstat (limited to 'src')
-rw-r--r--src/grid/mod.rs2
-rw-r--r--src/grid/row.rs2
-rw-r--r--src/lib.rs4
-rw-r--r--src/locale.rs2
-rw-r--r--src/logging.rs2
-rw-r--r--src/main.rs2
-rw-r--r--src/tty/unix.rs2
7 files changed, 8 insertions, 8 deletions
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<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 {
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<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 {
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<f32> 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)
};