]> git.lizzy.rs Git - PAKEs.git/commitdiff
update spake2 to edition-2018
authorBrian Warner <warner@lothar.com>
Thu, 6 Dec 2018 19:48:10 +0000 (11:48 -0800)
committerBrian Warner <warner@lothar.com>
Thu, 6 Dec 2018 23:00:20 +0000 (15:00 -0800)
spake2/Cargo.toml
spake2/benches/spake2.rs
spake2/src/lib.rs
spake2/tests/mod.rs

index 1c6765497087299d9762a94b32c122ec16a219fc..1ae436a5dd566f5f6d8a67121f2a2023766e6301 100644 (file)
@@ -1,6 +1,7 @@
 [package]
 name = "spake2"
 version = "0.1.2-alpha.0"
+edition = "2018"
 authors = ["Brian Warner <warner@lothar.com>"]
 description = "The SPAKE2 password-authenticated key-exchange algorithm."
 documentation = "https://docs.rs/spake2"
index 8323342a758460db419d01f9a74559764fd4130d..c2139478e01fd2ad701db8077f7b74c6067538ec 100644 (file)
@@ -1,9 +1,5 @@
-#[macro_use]
-extern crate bencher;
-
-extern crate spake2;
-
 use bencher::Bencher;
+use bencher::{benchmark_group, benchmark_main};
 use spake2::{Ed25519Group, Identity, Password, SPAKE2};
 
 fn spake2_start(bench: &mut Bencher) {
index 4ef7ad5ffff41898f5f420e29afe19994864fb1b..ea488bad2f94524cf6540e308752c45916620fa7 100644 (file)
 #![deny(warnings)]
 #![forbid(unsafe_code)]
 
-extern crate curve25519_dalek;
-extern crate hex;
-extern crate hkdf;
-extern crate num_bigint;
-extern crate rand;
-extern crate sha2;
-
 use curve25519_dalek::constants::ED25519_BASEPOINT_POINT;
 use curve25519_dalek::edwards::CompressedEdwardsY;
 use curve25519_dalek::edwards::EdwardsPoint as c2_Element;
 use curve25519_dalek::scalar::Scalar as c2_Scalar;
-
 use hkdf::Hkdf;
 use rand::{rngs::OsRng, CryptoRng, Rng};
 use sha2::{Digest, Sha256};
@@ -828,7 +820,7 @@ fn maybe_utf8(s: &[u8]) -> String {
 }
 
 impl<G: Group> fmt::Debug for SPAKE2<G> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
+    fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
         fmt.debug_struct("SPAKE2")
             .field("group", &G::name())
             .field("side", &self.side)
index e85a9b6715011195893a6667924cbe61d0d8d0e0..07ba9464dcd330d8f3561852a239afb56b69feab 100644 (file)
@@ -1,5 +1,3 @@
-extern crate spake2;
-
 use spake2::{Ed25519Group, ErrorType, Identity, Password, SPAKEErr, SPAKE2};
 
 #[test]