Skip to content

Commit 7763d6e

Browse files
authored
Merge pull request #158 from NoCtrlZ/feature/removed-all-warnings
Removed some warnings
2 parents 6316ab6 + da8b889 commit 7763d6e

File tree

13 files changed

+8
-15
lines changed

13 files changed

+8
-15
lines changed

core/bellman-verifier/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(not(feature = "std"), feature(alloc))]
32

43
#[cfg(not(feature = "std"))]
54
#[macro_use]

core/bellman-verifier/src/verifier.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn verify_proof<'a, E: Engine>(
5858
(&proof.a.prepare(), &proof.b.prepare()),
5959
(&acc.into_affine().prepare(), &pvk.neg_gamma_g2),
6060
(&proof.c.prepare(), &pvk.neg_delta_g2)
61-
].into_iter())
61+
].iter())
6262
).unwrap() == pvk.alpha_g1_beta_g2)
6363
}
6464

core/crypto/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(not(feature = "std"), feature(alloc))]
32

43
#[cfg(not(feature = "std"))]
54
#[macro_use]

core/jubjub/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(not(feature = "std"), feature(alloc))]
32

43
#[cfg(not(feature = "std"))]
54
#[macro_use]

core/keys/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Zerochain key components.
22
33
#![cfg_attr(not(feature = "std"), no_std)]
4-
#![cfg_attr(not(feature = "std"), feature(alloc))]
54

65
#[cfg(not(feature = "std"))]
76
#[macro_use]

core/pairing/src/bls12_381/fq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,9 @@ impl ::rand::Rand for FqRepr {
519519

520520
impl ::std::fmt::Display for FqRepr {
521521
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
522-
try!(write!(f, "0x"));
522+
(write!(f, "0x"))?;
523523
for i in self.0.iter().rev() {
524-
try!(write!(f, "{:016x}", *i));
524+
(write!(f, "{:016x}", *i))?;
525525
}
526526

527527
Ok(())

core/pairing/src/bls12_381/fr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ impl ::rand::Rand for FrRepr {
6666

6767
impl ::std::fmt::Display for FrRepr {
6868
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
69-
try!(write!(f, "0x"));
69+
(write!(f, "0x"))?;
7070
for i in self.0.iter().rev() {
71-
try!(write!(f, "{:016x}", *i));
71+
(write!(f, "{:016x}", *i))?;
7272
}
7373

7474
Ok(())

core/pairing/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(not(feature = "std"), feature(alloc))]
32

43
// `clippy` is a code linting tool for improving code quality by catching
54
// common mistakes or strange code patterns. If the `clippy` feature is
@@ -121,7 +120,7 @@ pub trait Engine: Sized + 'static + Clone {
121120
G2: Into<Self::G2Affine>,
122121
{
123122
Self::final_exponentiation(&Self::miller_loop(
124-
[(&(p.into().prepare()), &(q.into().prepare()))].into_iter(),
123+
[(&(p.into().prepare()), &(q.into().prepare()))].iter(),
125124
)).unwrap()
126125
}
127126
}

core/primitives/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![cfg_attr(not(feature = "std"), feature(alloc))]
32

43
#[cfg(not(feature = "std"))]
54
#[macro_use]

core/proofs/src/circuit/anonimity_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Binary {
4747
match index {
4848
Some(id) => {
4949
binaries[id] = true;
50-
for (i, b) in binaries.into_iter().enumerate() {
50+
for (i, b) in binaries.iter().enumerate() {
5151
let tmp = Boolean::from(AllocatedBit::alloc(
5252
cs.namespace(|| format!("{} binary {}", st, i)),
5353
Some(*b))?

0 commit comments

Comments
 (0)