diff --git a/components/equihash/Cargo.toml b/components/equihash/Cargo.toml index 9abfce822..2eb7c023d 100644 --- a/components/equihash/Cargo.toml +++ b/components/equihash/Cargo.toml @@ -6,7 +6,8 @@ authors = ["Jack Grigg "] 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" diff --git a/components/f4jumble/CHANGELOG.md b/components/f4jumble/CHANGELOG.md index 847ce994f..0dd3e14c9 100644 --- a/components/f4jumble/CHANGELOG.md +++ b/components/f4jumble/CHANGELOG.md @@ -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 diff --git a/components/f4jumble/Cargo.toml b/components/f4jumble/Cargo.toml index b5571e388..272cfef34 100644 --- a/components/f4jumble/Cargo.toml +++ b/components/f4jumble/Cargo.toml @@ -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"] diff --git a/components/zcash_address/CHANGELOG.md b/components/zcash_address/CHANGELOG.md index 12ac4b0a9..717393905 100644 --- a/components/zcash_address/CHANGELOG.md +++ b/components/zcash_address/CHANGELOG.md @@ -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). diff --git a/components/zcash_address/Cargo.toml b/components/zcash_address/Cargo.toml index 65f1f908a..9d9bcfb4b 100644 --- a/components/zcash_address/Cargo.toml +++ b/components/zcash_address/Cargo.toml @@ -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"] diff --git a/components/zcash_encoding/CHANGELOG.md b/components/zcash_encoding/CHANGELOG.md index 847ce994f..7334e441d 100644 --- a/components/zcash_encoding/CHANGELOG.md +++ b/components/zcash_encoding/CHANGELOG.md @@ -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. diff --git a/components/zcash_encoding/Cargo.toml b/components/zcash_encoding/Cargo.toml index b588fc0cb..e93d55d97 100644 --- a/components/zcash_encoding/Cargo.toml +++ b/components/zcash_encoding/Cargo.toml @@ -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"] diff --git a/components/zcash_encoding/src/lib.rs b/components/zcash_encoding/src/lib.rs index 901f1a19a..8e23f7b68 100644 --- a/components/zcash_encoding/src/lib.rs +++ b/components/zcash_encoding/src/lib.rs @@ -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] diff --git a/components/zcash_note_encryption/Cargo.toml b/components/zcash_note_encryption/Cargo.toml index cb225f216..de440572c 100644 --- a/components/zcash_note_encryption/Cargo.toml +++ b/components/zcash_note_encryption/Cargo.toml @@ -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] diff --git a/components/zcash_note_encryption/src/lib.rs b/components/zcash_note_encryption/src/lib.rs index 09ad12609..9627d05b2 100644 --- a/components/zcash_note_encryption/src/lib.rs +++ b/components/zcash_note_encryption/src/lib.rs @@ -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, diff --git a/zcash_client_backend/Cargo.toml b/zcash_client_backend/Cargo.toml index d2a887437..99c798de3 100644 --- a/zcash_client_backend/Cargo.toml +++ b/zcash_client_backend/Cargo.toml @@ -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" diff --git a/zcash_client_backend/examples/diversify-address.rs b/zcash_client_backend/examples/diversify-address.rs index 1071566c9..aa77e6e9a 100644 --- a/zcash_client_backend/examples/diversify-address.rs +++ b/zcash_client_backend/examples/diversify-address.rs @@ -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::{ diff --git a/zcash_client_backend/src/encoding.rs b/zcash_client_backend/src/encoding.rs index c36e8c778..b63a4aff8 100644 --- a/zcash_client_backend/src/encoding.rs +++ b/zcash_client_backend/src/encoding.rs @@ -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::{ diff --git a/zcash_client_backend/src/keys.rs b/zcash_client_backend/src/keys.rs index dc052c8d4..5b6e4c01f 100644 --- a/zcash_client_backend/src/keys.rs +++ b/zcash_client_backend/src/keys.rs @@ -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}; diff --git a/zcash_client_backend/src/proto.rs b/zcash_client_backend/src/proto.rs index 4e6ec9a6e..aa4d3183a 100644 --- a/zcash_client_backend/src/proto.rs +++ b/zcash_client_backend/src/proto.rs @@ -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}, diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index 8c7555b35..4fd976663 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -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" diff --git a/zcash_client_sqlite/src/wallet/transact.rs b/zcash_client_sqlite/src/wallet/transact.rs index 112dc9260..1ffa82cc6 100644 --- a/zcash_client_sqlite/src/wallet/transact.rs +++ b/zcash_client_sqlite/src/wallet/transact.rs @@ -1,7 +1,6 @@ //! Functions for creating transactions. //! use rusqlite::{named_params, Row}; -use std::convert::TryInto; use ff::PrimeField; diff --git a/zcash_extensions/CHANGELOG.md b/zcash_extensions/CHANGELOG.md index 744a7b1f7..980b98cc4 100644 --- a/zcash_extensions/CHANGELOG.md +++ b/zcash_extensions/CHANGELOG.md @@ -7,3 +7,4 @@ and this library adheres to Rust's notion of ## [Unreleased] Initial release. +MSRV is 1.56.1 diff --git a/zcash_extensions/Cargo.toml b/zcash_extensions/Cargo.toml index 49c3605c9..c92dd9e17 100644 --- a/zcash_extensions/Cargo.toml +++ b/zcash_extensions/Cargo.toml @@ -6,7 +6,8 @@ authors = ["Jack Grigg ", "Kris Nuttycombe "] 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" diff --git a/zcash_extensions/src/transparent/demo.rs b/zcash_extensions/src/transparent/demo.rs index f0f7966f8..e9150823b 100644 --- a/zcash_extensions/src/transparent/demo.rs +++ b/zcash_extensions/src/transparent/demo.rs @@ -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}; diff --git a/zcash_history/Cargo.toml b/zcash_history/Cargo.toml index f5b511ad0..2cec07fdb 100644 --- a/zcash_history/Cargo.toml +++ b/zcash_history/Cargo.toml @@ -2,7 +2,8 @@ name = "zcash_history" version = "0.3.0" authors = ["NikVolf "] -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" diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index dddcc0ef7..c57dd4670 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -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] diff --git a/zcash_primitives/src/legacy/keys.rs b/zcash_primitives/src/legacy/keys.rs index 6a29ddb20..fa22cca21 100644 --- a/zcash_primitives/src/legacy/keys.rs +++ b/zcash_primitives/src/legacy/keys.rs @@ -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}; diff --git a/zcash_primitives/src/memo.rs b/zcash_primitives/src/memo.rs index 7f8b38597..b9df2ab05 100644 --- a/zcash_primitives/src/memo.rs +++ b/zcash_primitives/src/memo.rs @@ -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}; diff --git a/zcash_primitives/src/merkle_tree.rs b/zcash_primitives/src/merkle_tree.rs index 7a5f41213..73471f3d9 100644 --- a/zcash_primitives/src/merkle_tree.rs +++ b/zcash_primitives/src/merkle_tree.rs @@ -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 MerklePath { 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}; diff --git a/zcash_primitives/src/merkle_tree/incremental.rs b/zcash_primitives/src/merkle_tree/incremental.rs index b5ceaaed7..daf7083c2 100644 --- a/zcash_primitives/src/merkle_tree/incremental.rs +++ b/zcash_primitives/src/merkle_tree/incremental.rs @@ -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::{ diff --git a/zcash_primitives/src/sapling.rs b/zcash_primitives/src/sapling.rs index f13a9a68e..267fb9cab 100644 --- a/zcash_primitives/src/sapling.rs +++ b/zcash_primitives/src/sapling.rs @@ -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, diff --git a/zcash_primitives/src/sapling/keys.rs b/zcash_primitives/src/sapling/keys.rs index db0c53928..eeb2d4042 100644 --- a/zcash_primitives/src/sapling/keys.rs +++ b/zcash_primitives/src/sapling/keys.rs @@ -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::{ diff --git a/zcash_primitives/src/sapling/note_encryption.rs b/zcash_primitives/src/sapling/note_encryption.rs index 182f5a523..fcb2064f2 100644 --- a/zcash_primitives/src/sapling/note_encryption.rs +++ b/zcash_primitives/src/sapling/note_encryption.rs @@ -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, diff --git a/zcash_primitives/src/transaction/builder.rs b/zcash_primitives/src/transaction/builder.rs index 81abaffb7..d2dacc655 100644 --- a/zcash_primitives/src/transaction/builder.rs +++ b/zcash_primitives/src/transaction/builder.rs @@ -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::>() .ok_or(Error::InvalidAmount) } diff --git a/zcash_primitives/src/transaction/components/sapling.rs b/zcash_primitives/src/transaction/components/sapling.rs index 9d22ce5e4..1639bc930 100644 --- a/zcash_primitives/src/transaction/components/sapling.rs +++ b/zcash_primitives/src/transaction/components/sapling.rs @@ -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}, diff --git a/zcash_primitives/src/transaction/sighash.rs b/zcash_primitives/src/transaction/sighash.rs index d37b0ed14..4de02c63f 100644 --- a/zcash_primitives/src/transaction/sighash.rs +++ b/zcash_primitives/src/transaction/sighash.rs @@ -1,6 +1,5 @@ use crate::legacy::Script; use blake2b_simd::Hash as Blake2bHash; -use std::convert::TryInto; use super::{ components::{ diff --git a/zcash_primitives/src/transaction/sighash_v5.rs b/zcash_primitives/src/transaction/sighash_v5.rs index 24aa033cf..aebe5f919 100644 --- a/zcash_primitives/src/transaction/sighash_v5.rs +++ b/zcash_primitives/src/transaction/sighash_v5.rs @@ -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}; diff --git a/zcash_primitives/src/zip32.rs b/zcash_primitives/src/zip32.rs index 66f6ceb99..6e4767d19 100644 --- a/zcash_primitives/src/zip32.rs +++ b/zcash_primitives/src/zip32.rs @@ -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}; diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index 47f7518fd..750e41e30 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -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]