Skip to content

Commit 0133591

Browse files
committed
block-cipher-trait: update to 2018 edition
1 parent 5e29acf commit 0133591

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

block-cipher-trait/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "block-cipher-trait"
33
version = "0.6.2"
4+
description = "Traits for description of block ciphers"
45
authors = ["RustCrypto Developers"]
6+
edition = "2018"
57
license = "MIT OR Apache-2.0"
6-
description = "Traits for description of block ciphers"
78
documentation = "https://docs.rs/block-cipher-trait"
89
repository = "https://github.com/RustCrypto/traits"
910
keywords = ["crypto", "block-cipher", "trait"]

block-cipher-trait/src/dev.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! Development-related functionality
2+
3+
/// Define test
14
#[macro_export]
25
macro_rules! new_test {
36
($name:ident, $test_name:expr, $cipher:ty) => {
@@ -102,6 +105,7 @@ macro_rules! new_test {
102105
};
103106
}
104107

108+
/// Define benchmark
105109
#[macro_export]
106110
macro_rules! bench {
107111
($cipher:path, $key_len:expr) => {

block-cipher-trait/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::error;
77
pub struct InvalidKeyLength;
88

99
impl fmt::Display for InvalidKeyLength {
10-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
10+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
1111
f.write_str("invalid key length")
1212
}
1313
}

block-cipher-trait/src/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
//! This crate defines a set of simple traits used to define functionality of
22
//! block ciphers.
3+
34
#![no_std]
4-
#![forbid(unsafe_code)]
55
#![doc(html_logo_url = "https://github.com/RustCrypto/meta/master/logo_small.png")]
6-
#[cfg(feature = "dev")]
7-
pub extern crate blobby;
8-
pub extern crate generic_array;
6+
#![forbid(unsafe_code)]
7+
#![warn(missing_docs, rust_2018_idioms)]
8+
99
#[cfg(feature = "std")]
1010
extern crate std;
1111

12-
use generic_array::typenum::Unsigned;
13-
use generic_array::{ArrayLength, GenericArray};
14-
1512
#[cfg(feature = "dev")]
1613
pub mod dev;
14+
1715
mod errors;
1816

19-
pub use errors::InvalidKeyLength;
17+
pub use crate::errors::InvalidKeyLength;
18+
pub use generic_array;
19+
20+
use generic_array::typenum::Unsigned;
21+
use generic_array::{ArrayLength, GenericArray};
2022

2123
type ParBlocks<B, P> = GenericArray<GenericArray<u8, B>, P>;
2224

0 commit comments

Comments
 (0)