Skip to content

Commit

Permalink
Merge pull request #110 from RustCrypto/stream-cipher/2018-edition
Browse files Browse the repository at this point in the history
stream-cipher: update to 2018 edition
  • Loading branch information
tarcieri authored May 10, 2020
2 parents 6e80c03 + 14e2f61 commit dffe5b2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
3 changes: 2 additions & 1 deletion stream-cipher/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[package]
name = "stream-cipher"
description = "Stream cipher traits"
version = "0.3.2"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Stream cipher traits"
edition = "2018"
documentation = "https://docs.rs/stream-cipher"
repository = "https://github.com/RustCrypto/traits"
keywords = ["crypto", "stream-cipher", "trait"]
Expand Down
2 changes: 2 additions & 0 deletions stream-cipher/src/dev.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Development-related functionality
/// Test core functionality of synchronous stream cipher
#[macro_export]
macro_rules! new_sync_test {
Expand Down
4 changes: 2 additions & 2 deletions stream-cipher/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::error;
pub struct LoopError;

impl fmt::Display for LoopError {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.write_str("Loop Error")
}
}
Expand All @@ -25,7 +25,7 @@ impl error::Error for LoopError {
pub struct InvalidKeyNonceLength;

impl fmt::Display for InvalidKeyNonceLength {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
f.write_str("Loop Error")
}
}
Expand Down
18 changes: 10 additions & 8 deletions stream-cipher/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@
//!
//! See [RustCrypto/stream-ciphers](https://github.com/RustCrypto/stream-ciphers)
//! for ciphers implementation.
#![no_std]
#![forbid(unsafe_code)]
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
#[cfg(feature = "dev")]
pub extern crate blobby;
pub extern crate generic_array;
#![forbid(unsafe_code)]
#![warn(missing_docs, rust_2018_idioms)]

#[cfg(feature = "std")]
extern crate std;

use generic_array::typenum::Unsigned;
use generic_array::{ArrayLength, GenericArray};

#[cfg(feature = "dev")]
pub mod dev;

mod errors;

pub use errors::{InvalidKeyNonceLength, LoopError};
pub use crate::errors::{InvalidKeyNonceLength, LoopError};
pub use generic_array;

use generic_array::typenum::Unsigned;
use generic_array::{ArrayLength, GenericArray};

/// Stream cipher creation trait.
///
Expand Down

0 comments on commit dffe5b2

Please sign in to comment.