From 9c16f3adb293d0788356c6acbb214e9137d66073 Mon Sep 17 00:00:00 2001 From: Andronik Ordian Date: Wed, 21 Apr 2021 14:38:53 +0200 Subject: [PATCH] fix edition 2018 --- Cargo.toml | 1 + benches/api.rs | 6 +----- examples/dh.rs | 5 +---- examples/joux.rs | 4 +--- tests/serialization.rs | 7 +------ 5 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e59d670..7925b951 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ readme = "README.md" homepage = "https://github.com/paritytech/bn" repository = "https://github.com/paritytech/bn" license = "MIT OR Apache-2.0" +edition = "2018" [features] default = ["rustc-serialize"] diff --git a/benches/api.rs b/benches/api.rs index de5b5b0a..16536103 100644 --- a/benches/api.rs +++ b/benches/api.rs @@ -1,10 +1,6 @@ #![feature(test)] -extern crate bincode; -extern crate bn; -extern crate rand; -extern crate test; -use bn::*; +use substrate_bn::*; use bincode::SizeLimit::Infinite; use bincode::rustc_serialize::{decode, encode}; diff --git a/examples/dh.rs b/examples/dh.rs index c0f89b97..8f3cdebf 100644 --- a/examples/dh.rs +++ b/examples/dh.rs @@ -1,10 +1,7 @@ // This is an example of three-party Diffie-Hellman key exchange // Requires two rounds -extern crate bn; -extern crate rand; - -use bn::*; +use substrate_bn::*; fn main() { let rng = &mut rand::thread_rng(); diff --git a/examples/joux.rs b/examples/joux.rs index 88cb53b7..ce0fec4a 100644 --- a/examples/joux.rs +++ b/examples/joux.rs @@ -1,6 +1,4 @@ -extern crate bn; -extern crate rand; -use bn::{Group, Fr, G1, G2, pairing}; +use substrate_bn::{Group, Fr, G1, G2, pairing}; fn main() { let rng = &mut rand::thread_rng(); diff --git a/tests/serialization.rs b/tests/serialization.rs index 801306e1..7cfee88c 100644 --- a/tests/serialization.rs +++ b/tests/serialization.rs @@ -1,11 +1,6 @@ #![cfg(feature = "rustc-serialize")] -extern crate rand; -extern crate bn; -extern crate bincode; -extern crate rustc_serialize; - -use bn::*; +use substrate_bn::*; use bincode::SizeLimit::Infinite; use bincode::rustc_serialize::{encode, decode};