Enforce Rust edition 2021 (#3332)
* Rust edition 2021: zebra-network, cargo fix --edition and clippy --fix * Rust edition 2021: zebra-chain, cargo fix --edition * Rust edition 2021: tower-batch, cargo fix --edition * Rust edition 2021: tower-fallback, cargo fix --edition * Rust edition 2021: zebra-client, cargo fix --edition * Rust edition 2021: zebra-consensus, cargo fix --edition * Rust edition 2021: zebra-rpc, cargo fix --edition * Rust edition 2021: zebra-state, cargo fix --edition * Rust edition 2021: zebra-state, cargo fix --edition * Rust edition 2021: zebra-test, cargo fix --edition * Rust edition 2021: zebra-utils, cargo fix --edition * Rust edition 2021: zebrad, cargo fix --edition Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
ece2d0f09b
commit
89b0403582
|
@ -3,7 +3,7 @@ name = "tower-batch"
|
|||
version = "0.2.19"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.3.19"
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
pub mod error;
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "tower-fallback"
|
|||
version = "0.2.15"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
tower = "0.4"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
pub mod future;
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-chain"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
// Required by bitvec! macro
|
||||
#![recursion_limit = "256"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{convert::TryFrom, marker::PhantomData};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use group::{cofactor::CofactorGroup, GroupEncoding};
|
||||
use halo2::{arithmetic::FieldExt, pasta::pallas};
|
||||
|
@ -95,7 +95,6 @@ impl<T: SigType> TryFrom<[u8; 32]> for VerificationKey<T> {
|
|||
type Error = Error;
|
||||
|
||||
fn try_from(bytes: [u8; 32]) -> Result<Self, Self::Error> {
|
||||
use std::convert::TryInto;
|
||||
VerificationKeyBytes::from(bytes).try_into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -311,8 +311,6 @@ impl ValueBalance<NonNegative> {
|
|||
/// The resulting [`ValueBalance`] will have half of the MAX_MONEY amount on each pool.
|
||||
#[cfg(any(test, feature = "proptest-impl"))]
|
||||
pub fn fake_populated_pool() -> ValueBalance<NonNegative> {
|
||||
use std::convert::TryFrom;
|
||||
|
||||
let mut fake_value_pool = ValueBalance::zero();
|
||||
|
||||
let fake_transparent_value_balance =
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-client"
|
|||
version = "1.0.0-beta.0"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-consensus"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
mod block;
|
||||
|
@ -54,9 +55,7 @@ pub mod chain;
|
|||
pub mod error;
|
||||
|
||||
pub use block::VerifyBlockError;
|
||||
pub use checkpoint::VerifyCheckpointError;
|
||||
pub use checkpoint::MAX_CHECKPOINT_BYTE_COUNT;
|
||||
pub use checkpoint::MAX_CHECKPOINT_HEIGHT_GAP;
|
||||
pub use checkpoint::{VerifyCheckpointError, MAX_CHECKPOINT_BYTE_COUNT, MAX_CHECKPOINT_HEIGHT_GAP};
|
||||
pub use config::Config;
|
||||
pub use error::BlockError;
|
||||
pub use primitives::groth16;
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-network"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
#[macro_use]
|
||||
|
|
|
@ -184,7 +184,7 @@ impl Codec {
|
|||
/// for large data structures like lists, blocks, and transactions.
|
||||
/// See #1774.
|
||||
fn body_length(&self, msg: &Message) -> usize {
|
||||
let mut writer = FakeWriter { 0: 0 };
|
||||
let mut writer = FakeWriter(0);
|
||||
|
||||
self.write_body(msg, &mut writer)
|
||||
.expect("writer should never fail");
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-rpc"
|
|||
version = "1.0.0-beta.0"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -7,4 +7,5 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-script"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
// we allow unsafe code, so we can call zcash_script
|
||||
|
||||
use std::{convert::TryInto, sync::Arc};
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-state"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[features]
|
||||
proptest-impl = ["proptest", "proptest-derive", "zebra-test"]
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
#[cfg(any(test, feature = "proptest-impl"))]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-test"
|
|||
version = "1.0.0-beta.3"
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
// Each lazy_static variable uses additional recursion
|
||||
#![recursion_limit = "512"]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebra-utils"
|
|||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
version = "1.0.0-beta.3"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
# Prevent accidental publication of this utility crate.
|
||||
publish = false
|
||||
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
|
|
|
@ -3,7 +3,7 @@ name = "zebrad"
|
|||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
version = "1.0.0-beta.3"
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
repository = "https://github.com/ZcashFoundation/zebra"
|
||||
# make `cargo run` use `zebrad` by default
|
||||
# when run in the workspace directory
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#![warn(missing_docs)]
|
||||
#![allow(clippy::try_err)]
|
||||
#![deny(clippy::await_holding_lock)]
|
||||
#![deny(rust_2021_compatibility)]
|
||||
#![forbid(unsafe_code)]
|
||||
// Tracing causes false positives on this lint:
|
||||
// https://github.com/tokio-rs/tracing/issues/553
|
||||
|
|
Loading…
Reference in New Issue