Browse Source

Cleanup dependencies

Use cargo-clippy instead of plugin(clippy).
pull/9/merge
Cesar Eduardo Barros 6 years ago
parent
commit
bd87202c46
  1. 3
      .gitignore
  2. 3
      Cargo.toml
  3. 14
      src/blake2.rs
  4. 2
      src/blake2b.rs
  5. 2
      src/blake2s.rs
  6. 4
      src/lib.rs
  7. 2
      src/simd.rs
  8. 2
      src/simd_opt/mod.rs
  9. 2
      src/simd_opt/u32x4.rs
  10. 2
      src/simd_opt/u64x4.rs
  11. 2
      src/simdty.rs

3
.gitignore

@ -1,2 +1,3 @@
target
/target
**/*.rs.bk
Cargo.lock

3
Cargo.toml

@ -22,9 +22,8 @@ simd_asm = ["simd_opt"]
std = []
[dependencies]
arrayvec = {version = "0.4.6", default-features = false}
arrayvec = { version = "0.4.0", default-features = false }
constant_time_eq = "0.1.0"
clippy = {version = "0.0.41", optional = true}
[dev-dependencies]
data-encoding = "2.0.0"

14
src/blake2.rs

@ -44,7 +44,7 @@ macro_rules! blake2_impl {
nn: usize,
}
#[cfg_attr(feature = "clippy", allow(len_without_is_empty))]
#[cfg_attr(feature = "cargo-clippy", allow(len_without_is_empty))]
impl $result {
/// Returns the contained hash result as a byte string.
#[inline]
@ -107,7 +107,7 @@ macro_rules! blake2_impl {
pub fn new(nn: usize) -> Self { Self::with_key(nn, &[]) }
/// Creates a new hashing context with a key.
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation))]
#[cfg_attr(feature = "cargo-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);
@ -128,7 +128,7 @@ macro_rules! blake2_impl {
}
#[doc(hidden)]
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation))]
#[cfg_attr(feature = "cargo-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;
@ -144,7 +144,7 @@ macro_rules! blake2_impl {
}
/// Updates the hashing context with more data.
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation))]
#[cfg_attr(feature = "cargo-clippy", allow(cast_possible_truncation))]
pub fn update(&mut self, data: &[u8]) {
let mut rest = data;
@ -190,7 +190,7 @@ macro_rules! blake2_impl {
self.finalize_with_flag(!0)
}
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation))]
#[cfg_attr(feature = "cargo-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 {
@ -242,7 +242,7 @@ macro_rules! blake2_impl {
$state::unshuffle(v);
}
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation, eq_op))]
#[cfg_attr(feature = "cargo-clippy", allow(cast_possible_truncation, eq_op))]
fn compress(&mut self, f0: $word, f1: $word) {
use $crate::blake2::SIGMA;
@ -303,7 +303,7 @@ macro_rules! blake2_impl {
}
}
#[cfg_attr(feature = "clippy", allow(cast_possible_truncation))]
#[cfg_attr(feature = "cargo-clippy", allow(cast_possible_truncation))]
#[cold]
pub fn selftest_seq(len: usize) -> ArrayVec<[u8; 1024]> {
use core::num::Wrapping;

2
src/blake2b.rs

@ -52,7 +52,7 @@ blake2_bench_impl!(Blake2b, 64);
#[cfg(test)]
mod tests {
#![cfg_attr(feature = "clippy", allow(result_unwrap_used))]
#![cfg_attr(feature = "cargo-clippy", allow(result_unwrap_used))]
extern crate data_encoding;
use self::data_encoding::HEXUPPER;

2
src/blake2s.rs

@ -50,7 +50,7 @@ blake2_bench_impl!(Blake2s, 32);
#[cfg(test)]
mod tests {
#![cfg_attr(feature = "clippy", allow(result_unwrap_used))]
#![cfg_attr(feature = "cargo-clippy", allow(result_unwrap_used))]
extern crate data_encoding;
use self::data_encoding::HEXUPPER;

4
src/lib.rs

@ -11,9 +11,7 @@
#![warn(missing_docs)]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(feature = "clippy", warn(clippy_pedantic))]
#![cfg_attr(feature = "cargo-clippy", warn(clippy_pedantic))]
#![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.
#![cfg_attr(feature = "clippy", allow(inline_always))]
#![cfg_attr(feature = "cargo-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.
#![cfg_attr(feature = "clippy", allow(inline_always))]
#![cfg_attr(feature = "cargo-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.
#![cfg_attr(feature = "clippy", allow(inline_always))]
#![cfg_attr(feature = "cargo-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.
#![cfg_attr(feature = "clippy", allow(inline_always))]
#![cfg_attr(feature = "cargo-clippy", allow(inline_always))]
use simdty::u64x4;

2
src/simdty.rs

@ -64,7 +64,7 @@ pub type u16x16 = Simd16<u16>;
pub type u8x32 = Simd32<u8>;
#[cfg_attr(feature = "clippy", allow(inline_always))]
#[cfg_attr(feature = "cargo-clippy", allow(inline_always))]
impl<T> Simd4<T> {
#[inline(always)]
pub fn new(e0: T, e1: T, e2: T, e3: T) -> Simd4<T> {

Loading…
Cancel
Save