]> git.lizzy.rs Git - PAKEs.git/commitdiff
update srp to idioms of edition-2018
authorBrian Warner <warner@lothar.com>
Thu, 6 Dec 2018 20:02:13 +0000 (12:02 -0800)
committerBrian Warner <warner@lothar.com>
Thu, 6 Dec 2018 23:00:26 +0000 (15:00 -0800)
srp/Cargo.toml
srp/src/groups.rs
srp/src/lib.rs
srp/src/server.rs
srp/src/types.rs
srp/tests/mod.rs

index 5db8c3fb709952aca7f762021b30d830f2000153..5955ddb4da9d7f5c90d053a1dec6d076cdd0628e 100644 (file)
@@ -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"
index 3438c42b60821b1f5b4873bcaf68ad76083d8762..d5c5fb9376bf98b31945cd912801a00a90fc124c 100644 (file)
@@ -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! {
index 1467496dbb8ce98f08f5ad19b13b6e8515c68a65..d05cfa8669bdd5c8c5e758501ac61e77fc2a1c33 100644 (file)
 //! [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;
index 3946949c25c2869b5a34af0588e9ef2a6977504c..a4764d3a73778d0cbc7a8264b99208c816f18b33 100644 (file)
@@ -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,
index df5a6e8eebe561385a863da0216cc74ba8000da4..6ae8595093341199566b2daeb3899fcbb02fe1c4 100644 (file)
@@ -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")
     }
 }
index c410d699f3fc425d96b73af2cc0f37eb4064d55a..58bfa0f93e702a9046874c302622465507238809 100644 (file)
@@ -1,8 +1,4 @@
-extern crate num;
-extern crate rand;
-extern crate sha2;
-extern crate srp;
-
+use rand;
 use rand::RngCore;
 use sha2::Sha256;