mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-01-30 23:42:13 +00:00
cargo fix --edition-idioms for zcash_primitives
This commit is contained in:
parent
573ffc4e06
commit
c28ae31c71
@ -10,7 +10,7 @@ use crate::serialize::Vector;
|
||||
pub struct BlockHash(pub [u8; 32]);
|
||||
|
||||
impl fmt::Display for BlockHash {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut data = self.0.clone();
|
||||
data.reverse();
|
||||
formatter.write_str(&hex::encode(data))
|
||||
|
@ -74,7 +74,7 @@ const NEGATIVE_ONE: Fs = Fs(FsRepr([
|
||||
pub struct FsRepr(pub [u64; 4]);
|
||||
|
||||
impl ::std::fmt::Display for FsRepr {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
r#write!(f, "0x")?;
|
||||
for i in self.0.iter().rev() {
|
||||
r#write!(f, "{:016x}", *i)?;
|
||||
@ -257,7 +257,7 @@ impl PrimeFieldRepr for FsRepr {
|
||||
pub struct Fs(FsRepr);
|
||||
|
||||
impl ::std::fmt::Display for Fs {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
||||
write!(f, "Fs({})", self.into_repr())
|
||||
}
|
||||
}
|
||||
|
@ -1,26 +1,25 @@
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
extern crate aes;
|
||||
extern crate blake2b_simd;
|
||||
extern crate blake2s_simd;
|
||||
extern crate byteorder;
|
||||
extern crate crypto_api_chachapoly;
|
||||
extern crate ff;
|
||||
extern crate fpe;
|
||||
extern crate hex;
|
||||
extern crate pairing;
|
||||
extern crate rand;
|
||||
extern crate rand_core;
|
||||
extern crate rand_os;
|
||||
extern crate sha2;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate hex_literal;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rand_xorshift;
|
||||
|
||||
|
||||
pub mod block;
|
||||
pub mod constants;
|
||||
|
@ -104,7 +104,7 @@ pub struct SpendDescription {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for SpendDescription {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"SpendDescription(cv = {:?}, anchor = {:?}, nullifier = {:?}, rk = {:?}, spend_auth_sig = {:?})",
|
||||
@ -186,7 +186,7 @@ pub struct OutputDescription {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for OutputDescription {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"OutputDescription(cv = {:?}, cmu = {:?}, ephemeral_key = {:?})",
|
||||
@ -253,7 +253,7 @@ enum SproutProof {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for SproutProof {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
match self {
|
||||
SproutProof::Groth(_) => write!(f, "SproutProof::Groth"),
|
||||
SproutProof::PHGR(_) => write!(f, "SproutProof::PHGR"),
|
||||
@ -275,7 +275,7 @@ pub struct JSDescription {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for JSDescription {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"JSDescription(
|
||||
|
@ -28,7 +28,7 @@ const SAPLING_TX_VERSION: u32 = 4;
|
||||
pub struct TxId(pub [u8; 32]);
|
||||
|
||||
impl fmt::Display for TxId {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let mut data = self.0.clone();
|
||||
data.reverse();
|
||||
formatter.write_str(&hex::encode(data))
|
||||
@ -74,7 +74,7 @@ pub struct TransactionData {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for TransactionData {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"TransactionData(
|
||||
|
@ -198,7 +198,7 @@ impl std::cmp::PartialEq for ExtendedSpendingKey {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for ExtendedSpendingKey {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"ExtendedSpendingKey(d = {}, tag_p = {:?}, i = {:?})",
|
||||
@ -221,7 +221,7 @@ impl std::cmp::PartialEq for ExtendedFullViewingKey {
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for ExtendedFullViewingKey {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(
|
||||
f,
|
||||
"ExtendedFullViewingKey(d = {}, tag_p = {:?}, i = {:?})",
|
||||
|
Loading…
Reference in New Issue
Block a user