aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--srp/Cargo.toml1
-rw-r--r--srp/src/groups.rs1
-rw-r--r--srp/src/lib.rs8
-rw-r--r--srp/src/server.rs2
-rw-r--r--srp/src/types.rs2
-rw-r--r--srp/tests/mod.rs6
6 files changed, 5 insertions, 15 deletions
diff --git a/srp/Cargo.toml b/srp/Cargo.toml
index 5db8c3f..5955ddb 100644
--- a/srp/Cargo.toml
+++ b/srp/Cargo.toml
@@ -1,6 +1,7 @@
[package]
name = "srp"
version = "0.3.0"
+edition = "2018"
authors = ["RustCrypto Developers"]
license = "MIT OR Apache-2.0"
description = "Secure Remote Password (SRP) protocol implementation"
diff --git a/srp/src/groups.rs b/srp/src/groups.rs
index 3438c42..d5c5fb9 100644
--- a/srp/src/groups.rs
+++ b/srp/src/groups.rs
@@ -4,6 +4,7 @@
//! groups. Additionally it is not recommended to use `G_1024` and `G_1536`,
//! they are provided only for compatibility with the legacy software.
use crate::types::SrpGroup;
+use lazy_static::lazy_static;
use num::BigUint;
lazy_static! {
diff --git a/srp/src/lib.rs b/srp/src/lib.rs
index 1467496..d05cfa8 100644
--- a/srp/src/lib.rs
+++ b/srp/src/lib.rs
@@ -64,14 +64,6 @@
//! [1]: https://en.wikipedia.org/wiki/Secure_Remote_Password_protocol
//! [2]: https://tools.ietf.org/html/rfc5054
#![doc(html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]
-extern crate digest;
-extern crate generic_array;
-extern crate num;
-#[macro_use]
-extern crate lazy_static;
-
-#[cfg(test)]
-extern crate sha1;
pub mod client;
pub mod groups;
diff --git a/srp/src/server.rs b/srp/src/server.rs
index 3946949..a4764d3 100644
--- a/srp/src/server.rs
+++ b/srp/src/server.rs
@@ -65,7 +65,7 @@ pub struct SrpServer<D: Digest> {
impl<D: Digest> SrpServer<D> {
/// Create new server state.
pub fn new(
- user: &UserRecord,
+ user: &UserRecord<'_>,
a_pub: &[u8],
b: &[u8],
params: &SrpGroup,
diff --git a/srp/src/types.rs b/srp/src/types.rs
index df5a6e8..6ae8595 100644
--- a/srp/src/types.rs
+++ b/srp/src/types.rs
@@ -11,7 +11,7 @@ pub struct SrpAuthError {
}
impl fmt::Display for SrpAuthError {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "SRP authentification error")
}
}
diff --git a/srp/tests/mod.rs b/srp/tests/mod.rs
index c410d69..58bfa0f 100644
--- a/srp/tests/mod.rs
+++ b/srp/tests/mod.rs
@@ -1,8 +1,4 @@
-extern crate num;
-extern crate rand;
-extern crate sha2;
-extern crate srp;
-
+use rand;
use rand::RngCore;
use sha2::Sha256;