Merge pull request #627 from nuttycom/edition_2021

Update to Rust 2021
This commit is contained in:
str4d 2022-09-07 11:41:44 +01:00 committed by GitHub
commit 980f6b4e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 30 additions and 42 deletions

View File

@ -6,7 +6,8 @@ authors = ["Jack Grigg <jack@z.cash>"]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
[dependencies]
blake2b_simd = "1"

View File

@ -9,3 +9,4 @@ and this library adheres to Rust's notion of
## [0.1.0] - 2022-05-11
Initial release.
MSRV is 1.51

View File

@ -12,6 +12,7 @@ repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.51"
categories = ["encoding"]
keywords = ["feistel"]

View File

@ -12,6 +12,9 @@ and this library adheres to Rust's notion of
- `zcash_address::TryFromRawAddress`
- `zcash_address::ZcashAddress::convert_if_network`
### Changed
- MSRV is now 1.52
### Removed
- `zcash_address::FromAddress` (use `TryFromAddress` instead).

View File

@ -10,6 +10,7 @@ repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.52"
categories = ["cryptography::cryptocurrencies", "encoding"]
keywords = ["zcash", "address", "sapling", "unified"]

View File

@ -7,5 +7,8 @@ and this library adheres to Rust's notion of
## [Unreleased]
### Changed
- MSRV is now 1.52
## [0.1.0] - 2022-05-11
Initial release.

View File

@ -10,7 +10,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
categories = ["cryptography::cryptocurrencies", "encoding"]
keywords = ["zcash"]

View File

@ -10,7 +10,6 @@
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use nonempty::NonEmpty;
use std::convert::TryFrom;
use std::io::{self, Read, Write};
use std::iter::FromIterator;
@ -271,7 +270,6 @@ impl Optional {
#[cfg(test)]
mod tests {
use super::*;
use std::convert::{TryFrom, TryInto};
use std::fmt::Debug;
#[test]

View File

@ -10,7 +10,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
categories = ["cryptography::cryptocurrencies"]
[package.metadata.docs.rs]

View File

@ -24,8 +24,6 @@ extern crate alloc;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
use core::convert::TryInto;
use chacha20::{
cipher::{NewCipher, StreamCipher, StreamCipherSeek},
ChaCha20,

View File

@ -10,7 +10,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
[dependencies]
base64 = "0.13"

View File

@ -1,5 +1,3 @@
use std::convert::TryInto;
use gumdrop::Options;
use zcash_client_backend::encoding::{decode_extended_full_viewing_key, encode_payment_address};
use zcash_primitives::{

View File

@ -7,7 +7,6 @@
use bech32::{self, Error, FromBase32, ToBase32, Variant};
use bs58::{self, decode::Error as Bs58Error};
use std::convert::TryInto;
use std::fmt;
use std::io::{self, Write};
use zcash_primitives::{

View File

@ -8,9 +8,6 @@ use zcash_primitives::{
use crate::address::UnifiedAddress;
#[cfg(feature = "transparent-inputs")]
use std::convert::TryInto;
#[cfg(feature = "transparent-inputs")]
use zcash_primitives::legacy::keys::{self as legacy, IncomingViewingKey};

View File

@ -1,7 +1,6 @@
//! Generated code for handling light client protobuf structs.
use ff::PrimeField;
use std::convert::{TryFrom, TryInto};
use zcash_primitives::{
block::{BlockHash, BlockHeader},

View File

@ -10,7 +10,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
[dependencies]
bech32 = "0.8"

View File

@ -1,7 +1,6 @@
//! Functions for creating transactions.
//!
use rusqlite::{named_params, Row};
use std::convert::TryInto;
use ff::PrimeField;

View File

@ -7,3 +7,4 @@ and this library adheres to Rust's notion of
## [Unreleased]
Initial release.
MSRV is 1.56.1

View File

@ -6,7 +6,8 @@ authors = ["Jack Grigg <jack@z.cash>", "Kris Nuttycombe <kris@z.cash>"]
homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
[dependencies]
blake2b_simd = "1"

View File

@ -18,8 +18,6 @@
//! - `tx_b`: `[ TzeIn(tx_a, preimage_1) -> TzeOut(value, hash_2) ]`
//! - `tx_c`: `[ TzeIn(tx_b, preimage_2) -> [any output types...] ]`
use std::convert::TryFrom;
use std::convert::TryInto;
use std::fmt;
use std::ops::{Deref, DerefMut};

View File

@ -2,7 +2,8 @@
name = "zcash_history"
version = "0.3.0"
authors = ["NikVolf <nikvolf@gmail.com>"]
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
license = "MIT/Apache-2.0"
documentation = "https://docs.rs/zcash_history/"
description = "Library for Zcash blockchain history tools"

View File

@ -10,7 +10,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
categories = ["cryptography::cryptocurrencies"]
[package.metadata.docs.rs]

View File

@ -2,7 +2,6 @@ use hdwallet::{ExtendedPrivKey, ExtendedPubKey, KeyIndex};
use ripemd::Digest as RipemdDigest;
use secp256k1::PublicKey;
use sha2::{Digest as Sha2Digest, Sha256};
use std::convert::TryInto;
use crate::{consensus, keys::prf_expand_vec, zip32::AccountId};

View File

@ -1,7 +1,6 @@
//! Structs for handling encrypted memos.
use std::cmp::Ordering;
use std::convert::{TryFrom, TryInto};
use std::error;
use std::fmt;
use std::ops::Deref;
@ -275,7 +274,6 @@ impl str::FromStr for Memo {
#[cfg(test)]
mod tests {
use std::convert::TryInto;
use std::str::FromStr;
use super::{Error, Memo, MemoBytes};

View File

@ -7,7 +7,6 @@ use incrementalmerkletree::{
Altitude,
};
use std::collections::VecDeque;
use std::convert::TryFrom;
use std::io::{self, Read, Write};
use std::iter::repeat;
use zcash_encoding::{Optional, Vector};
@ -620,7 +619,6 @@ impl<Node: Hashable> MerklePath<Node> {
mod tests {
use incrementalmerkletree::bridgetree::Frontier;
use proptest::prelude::*;
use std::convert::TryInto;
use std::io::{self, Read, Write};
use crate::sapling::{testing::arb_node, Node};

View File

@ -1,7 +1,6 @@
//! Implementations of serialization and parsing for Orchard note commitment trees.
use byteorder::{LittleEndian, ReadBytesExt, WriteBytesExt};
use std::convert::{TryFrom, TryInto};
use std::io::{self, Read, Write};
use incrementalmerkletree::{

View File

@ -17,7 +17,6 @@ use incrementalmerkletree::{self, Altitude};
use lazy_static::lazy_static;
use rand_core::{CryptoRng, RngCore};
use std::array::TryFromSliceError;
use std::convert::{TryFrom, TryInto};
use std::io::{self, Read, Write};
use subtle::{Choice, ConstantTimeEq};
@ -526,7 +525,6 @@ impl Note {
pub mod testing {
use proptest::prelude::*;
use std::cmp::min;
use std::convert::TryFrom;
use crate::{
transaction::components::amount::MAX_MONEY, zip32::testing::arb_extended_spending_key,

View File

@ -4,7 +4,6 @@
//!
//! [section 4.2.2]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents
use std::convert::TryInto;
use std::io::{self, Read, Write};
use crate::{

View File

@ -5,7 +5,6 @@ use ff::PrimeField;
use group::{cofactor::CofactorGroup, GroupEncoding};
use jubjub::{AffinePoint, ExtendedPoint};
use rand_core::RngCore;
use std::convert::TryInto;
use zcash_note_encryption::{
try_compact_note_decryption, try_note_decryption, try_output_recovery_with_ock,
@ -474,7 +473,6 @@ mod tests {
use group::{cofactor::CofactorGroup, GroupEncoding};
use rand_core::OsRng;
use rand_core::{CryptoRng, RngCore};
use std::convert::TryInto;
use zcash_note_encryption::{
batch, EphemeralKeyBytes, NoteEncryption, OutgoingCipherKey, ENC_CIPHERTEXT_SIZE,

View File

@ -266,7 +266,8 @@ impl<'a, P: consensus::Parameters, R: RngCore> Builder<'a, P, R> {
.ok_or(Error::InvalidAmount)?,
];
IntoIterator::into_iter(&value_balances)
value_balances
.into_iter()
.sum::<Option<_>>()
.ok_or(Error::InvalidAmount)
}

View File

@ -1,5 +1,4 @@
use core::fmt::Debug;
use std::convert::TryInto;
use ff::PrimeField;
use group::GroupEncoding;
@ -429,7 +428,6 @@ pub mod testing {
use proptest::collection::vec;
use proptest::prelude::*;
use rand::{rngs::StdRng, SeedableRng};
use std::convert::TryFrom;
use crate::{
constants::{SPENDING_KEY_GENERATOR, VALUE_COMMITMENT_RANDOMNESS_GENERATOR},

View File

@ -1,6 +1,5 @@
use crate::legacy::Script;
use blake2b_simd::Hash as Blake2bHash;
use std::convert::TryInto;
use super::{
components::{

View File

@ -17,9 +17,6 @@ use crate::transaction::{
Authorization, TransactionData, TransparentDigests, TxDigests,
};
#[cfg(feature = "zfuture")]
use std::convert::TryInto;
#[cfg(feature = "zfuture")]
use zcash_encoding::{CompactSize, Vector};

View File

@ -6,7 +6,6 @@ use aes::Aes256;
use blake2b_simd::Params as Blake2bParams;
use byteorder::{ByteOrder, LittleEndian, ReadBytesExt, WriteBytesExt};
use fpe::ff1::{BinaryNumeralString, FF1};
use std::convert::TryInto;
use std::ops::AddAssign;
use subtle::{Choice, ConditionallySelectable};

View File

@ -9,7 +9,8 @@ homepage = "https://github.com/zcash/librustzcash"
repository = "https://github.com/zcash/librustzcash"
readme = "README.md"
license = "MIT OR Apache-2.0"
edition = "2018"
edition = "2021"
rust-version = "1.56.1"
categories = ["cryptography::cryptocurrencies"]
[package.metadata.docs.rs]