Browse Source

Don't use allow(unknown_lints)

pull/3/head
Cesar Eduardo Barros 8 years ago
parent
commit
b48e90aa0b
  1. 16
      src/blake2.rs
  2. 2
      src/blake2b.rs
  3. 2
      src/blake2s.rs
  4. 1
      src/lib.rs
  5. 2
      src/simd.rs
  6. 2
      src/simd_opt/mod.rs
  7. 2
      src/simd_opt/u32x4.rs
  8. 2
      src/simd_opt/u64x4.rs
  9. 2
      src/simdty.rs

16
src/blake2.rs

@ -41,7 +41,7 @@ macro_rules! blake2_impl {
nn: usize,
}
#[allow(len_without_is_empty)]
#[cfg_attr(feature="clippy", allow(len_without_is_empty))]
impl $result {
/// Returns the contained hash result as a byte string.
#[inline]
@ -104,7 +104,7 @@ macro_rules! blake2_impl {
pub fn new(nn: usize) -> Self { Self::with_key(nn, &[]) }
/// Creates a new hashing context with a key.
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
pub fn with_key(nn: usize, k: &[u8]) -> Self {
let kk = k.len();
assert!(nn >= 1 && nn <= $bytes && kk <= $bytes);
@ -125,7 +125,7 @@ macro_rules! blake2_impl {
}
#[doc(hidden)]
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
pub fn with_parameter_block(p: &[$word; 8]) -> Self {
let nn = p[0] as u8 as usize;
let kk = (p[0] >> 8) as u8 as usize;
@ -141,7 +141,7 @@ macro_rules! blake2_impl {
}
/// Updates the hashing context with more data.
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
pub fn update(&mut self, data: &[u8]) {
let mut rest = data;
@ -184,7 +184,7 @@ macro_rules! blake2_impl {
self.finalize_with_flag(!0)
}
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
fn finalize_with_flag(mut self, f1: $word) -> $result {
let off = (self.t % ($bytes * 2)) as usize;
if off != 0 {
@ -236,7 +236,7 @@ macro_rules! blake2_impl {
$state::unshuffle(v);
}
#[allow(cast_possible_truncation, eq_op)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation, eq_op))]
fn compress(&mut self, f0: $word, f1: $word) {
use $crate::blake2::SIGMA;
@ -296,7 +296,7 @@ macro_rules! blake2_impl {
}
}
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
pub fn selftest_seq(len: usize) -> Vec<u8> {
use std::num::Wrapping;
@ -353,7 +353,7 @@ macro_rules! blake2_bench_impl {
use blake2::selftest_seq;
use super::$state;
#[allow(cast_possible_truncation)]
#[cfg_attr(feature="clippy", allow(cast_possible_truncation))]
fn bench_blake2(bytes: u64, b: &mut Bencher) {
let data = selftest_seq(bytes as usize);

2
src/blake2b.rs

@ -51,7 +51,7 @@ blake2_bench_impl!(Blake2b, 64);
#[cfg(test)]
mod tests {
#![allow(result_unwrap_used)]
#![cfg_attr(feature="clippy", allow(result_unwrap_used))]
use std::io::prelude::*;

2
src/blake2s.rs

@ -49,7 +49,7 @@ blake2_bench_impl!(Blake2s, 32);
#[cfg(test)]
mod tests {
#![allow(result_unwrap_used)]
#![cfg_attr(feature="clippy", allow(result_unwrap_used))]
use std::io::prelude::*;

1
src/lib.rs

@ -10,7 +10,6 @@
#![cfg_attr(feature="clippy", feature(plugin))]
#![cfg_attr(feature="clippy", plugin(clippy))]
#![cfg_attr(feature="clippy", warn(clippy_pedantic))]
#![cfg_attr(not(feature="clippy"), allow(unknown_lints))]
#![cfg_attr(all(feature = "bench", test), feature(test))]
#![cfg_attr(feature = "simd", feature(platform_intrinsics, repr_simd))]

2
src/simd.rs

@ -5,7 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![allow(inline_always)]
#![cfg_attr(feature="clippy", allow(inline_always))]
use simd_opt;

2
src/simd_opt/mod.rs

@ -5,7 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![allow(inline_always)]
#![cfg_attr(feature="clippy", allow(inline_always))]
#[cfg(feature = "simd")]
macro_rules! transmute_shuffle {

2
src/simd_opt/u32x4.rs

@ -5,7 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![allow(inline_always)]
#![cfg_attr(feature="clippy", allow(inline_always))]
use simdty::u32x4;

2
src/simd_opt/u64x4.rs

@ -5,7 +5,7 @@
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
#![allow(inline_always)]
#![cfg_attr(feature="clippy", allow(inline_always))]
use simdty::u64x4;

2
src/simdty.rs

@ -6,8 +6,8 @@
// copied, modified, or distributed except according to those terms.
#![allow(dead_code)]
#![allow(inline_always)]
#![allow(non_camel_case_types)]
#![cfg_attr(feature="clippy", allow(inline_always))]
#[cfg(feature = "simd")]
macro_rules! decl_simd {

Loading…
Cancel
Save