Remove redundant TryFrom/TryInto imports.
This commit is contained in:
parent
16a0e43f2d
commit
a93f5945ab
|
@ -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]
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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::{
|
||||
|
|
|
@ -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::{
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! Functions for creating transactions.
|
||||
//!
|
||||
use rusqlite::{named_params, Row};
|
||||
use std::convert::TryInto;
|
||||
|
||||
use ff::PrimeField;
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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::{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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::{
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use crate::legacy::Script;
|
||||
use blake2b_simd::Hash as Blake2bHash;
|
||||
use std::convert::TryInto;
|
||||
|
||||
use super::{
|
||||
components::{
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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};
|
||||
|
||||
|
|
Loading…
Reference in New Issue