From: Brian Warner Date: Thu, 6 Dec 2018 19:57:53 +0000 (-0800) Subject: srp: fix to work with edition-2018 X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=39709aeebfe08052d84094c34e624acb591de4d1;p=PAKEs.git srp: fix to work with edition-2018 --- diff --git a/srp/src/client.rs b/srp/src/client.rs index 57c29c8..6cc1d7f 100644 --- a/srp/src/client.rs +++ b/srp/src/client.rs @@ -62,8 +62,8 @@ use digest::Digest; use generic_array::GenericArray; use num::{BigUint, Zero}; -use tools::powm; -use types::{SrpAuthError, SrpGroup}; +use crate::tools::powm; +use crate::types::{SrpAuthError, SrpGroup}; /// SRP client state before handshake with the server. pub struct SrpClient<'a, D: Digest> { diff --git a/srp/src/groups.rs b/srp/src/groups.rs index 90b5209..3438c42 100644 --- a/srp/src/groups.rs +++ b/srp/src/groups.rs @@ -3,8 +3,8 @@ //! It is strongly recommended to use them instead of custom generated //! 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 num::BigUint; -use types::SrpGroup; lazy_static! { pub static ref G_1024: SrpGroup = SrpGroup { diff --git a/srp/src/server.rs b/srp/src/server.rs index 52e9c38..3946949 100644 --- a/srp/src/server.rs +++ b/srp/src/server.rs @@ -40,8 +40,8 @@ use digest::Digest; use generic_array::GenericArray; use num::{BigUint, Zero}; -use tools::powm; -use types::{SrpAuthError, SrpGroup}; +use crate::tools::powm; +use crate::types::{SrpAuthError, SrpGroup}; /// Data provided by users upon registration, usually stored in the database. pub struct UserRecord<'a> { diff --git a/srp/src/types.rs b/srp/src/types.rs index e2048a3..df5a6e8 100644 --- a/srp/src/types.rs +++ b/srp/src/types.rs @@ -1,8 +1,8 @@ //! Additional SRP types. +use crate::tools::powm; use digest::Digest; use num::BigUint; use std::{error, fmt}; -use tools::powm; /// SRP authentification error. #[derive(Debug, Copy, Clone, Eq, PartialEq)] @@ -53,7 +53,7 @@ impl SrpGroup { #[cfg(test)] mod tests { - use groups::G_1024; + use crate::groups::G_1024; use sha1::Sha1; #[test]