removes outdated matches crate from dependencies (#33172)

removes outdated matches crate from the dependencies

std::matches has been stable since rust 1.42.0.
Other use-cases are covered by assert_matches crate.
This commit is contained in:
behzad nouri 2023-09-07 12:52:57 +00:00 committed by GitHub
parent f4816dc0cf
commit 528a03f32a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 27 additions and 40 deletions

14
Cargo.lock generated
View File

@ -5722,6 +5722,7 @@ dependencies = [
name = "solana-core"
version = "1.17.0"
dependencies = [
"assert_matches",
"base64 0.21.3",
"bincode",
"bs58",
@ -5737,7 +5738,6 @@ dependencies = [
"lazy_static",
"log",
"lru",
"matches",
"min-max-heap",
"num_enum 0.6.1",
"quinn",
@ -5879,12 +5879,12 @@ dependencies = [
name = "solana-entry"
version = "1.17.0"
dependencies = [
"assert_matches",
"bincode",
"crossbeam-channel",
"dlopen2",
"lazy_static",
"log",
"matches",
"rand 0.8.5",
"rayon",
"serde",
@ -6033,6 +6033,7 @@ dependencies = [
name = "solana-gossip"
version = "1.17.0"
dependencies = [
"assert_matches",
"bincode",
"bv",
"clap 2.33.3",
@ -6042,7 +6043,6 @@ dependencies = [
"itertools",
"log",
"lru",
"matches",
"num-traits",
"num_cpus",
"rand 0.8.5",
@ -6151,7 +6151,6 @@ dependencies = [
"libc",
"log",
"lru",
"matches",
"num_cpus",
"num_enum 0.6.1",
"prost",
@ -6349,7 +6348,6 @@ version = "1.17.0"
dependencies = [
"fast-math",
"hex",
"matches",
"solana-program",
]
@ -6415,6 +6413,7 @@ name = "solana-perf"
version = "1.17.0"
dependencies = [
"ahash 0.8.3",
"assert_matches",
"bincode",
"bv",
"caps",
@ -6424,7 +6423,6 @@ dependencies = [
"lazy_static",
"libc",
"log",
"matches",
"nix 0.26.4",
"rand 0.8.5",
"rand_chacha 0.3.1",
@ -6442,11 +6440,11 @@ dependencies = [
name = "solana-poh"
version = "1.17.0"
dependencies = [
"assert_matches",
"bincode",
"core_affinity",
"crossbeam-channel",
"log",
"matches",
"rand 0.8.5",
"solana-entry",
"solana-ledger",
@ -7276,6 +7274,7 @@ dependencies = [
name = "solana-turbine"
version = "1.17.0"
dependencies = [
"assert_matches",
"bincode",
"bytes",
"crossbeam-channel",
@ -7283,7 +7282,6 @@ dependencies = [
"itertools",
"log",
"lru",
"matches",
"quinn",
"rand 0.8.5",
"rand_chacha 0.3.1",

View File

@ -231,7 +231,6 @@ light-poseidon = "0.1.1"
log = "0.4.20"
lru = "0.7.7"
lz4 = "1.24.0"
matches = "0.1.10"
memmap2 = "0.5.10"
memoffset = "0.9"
merlin = "3"

View File

@ -76,8 +76,8 @@ tokio = { workspace = true, features = ["full"] }
trees = { workspace = true }
[dev-dependencies]
assert_matches = { workspace = true }
fs_extra = { workspace = true }
matches = { workspace = true }
raptorq = { workspace = true }
serde_json = { workspace = true }
serial_test = { workspace = true }

View File

@ -69,4 +69,4 @@ extern crate solana_frozen_abi_macro;
#[cfg(test)]
#[macro_use]
extern crate matches;
extern crate assert_matches;

View File

@ -26,7 +26,7 @@ solana-rayon-threadlimit = { workspace = true }
solana-sdk = { workspace = true }
[dev-dependencies]
matches = { workspace = true }
assert_matches = { workspace = true }
solana-logger = { workspace = true }
[lib]

View File

@ -128,7 +128,7 @@ pub fn compute_hashes_per_tick(duration: Duration, hashes_sample_size: u64) -> u
mod tests {
use {
crate::poh::{Poh, PohEntry},
matches::assert_matches,
assert_matches::assert_matches,
solana_sdk::hash::{hash, hashv, Hash},
std::time::Duration,
};

View File

@ -10,6 +10,7 @@ license = { workspace = true }
edition = { workspace = true }
[dependencies]
assert_matches = { workspace = true }
bincode = { workspace = true }
bv = { workspace = true, features = ["serde"] }
clap = { workspace = true }
@ -19,7 +20,6 @@ indexmap = { workspace = true, features = ["rayon"] }
itertools = { workspace = true }
log = { workspace = true }
lru = { workspace = true }
matches = { workspace = true }
num-traits = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }

View File

@ -1,6 +1,6 @@
use {
crate::crds_value::MAX_WALLCLOCK,
matches::{assert_matches, debug_assert_matches},
assert_matches::{assert_matches, debug_assert_matches},
serde::{Deserialize, Deserializer, Serialize},
solana_sdk::{
pubkey::Pubkey,

View File

@ -32,13 +32,13 @@ use {
crds_value::{CrdsData, CrdsValue, CrdsValueLabel},
legacy_contact_info::LegacyContactInfo as ContactInfo,
},
assert_matches::debug_assert_matches,
bincode::serialize,
indexmap::{
map::{rayon::ParValues, Entry, IndexMap},
set::IndexSet,
},
lru::LruCache,
matches::debug_assert_matches,
rayon::{prelude::*, ThreadPool},
solana_sdk::{
clock::Slot,

View File

@ -31,7 +31,7 @@ extern crate log;
#[cfg(test)]
#[macro_use]
extern crate matches;
extern crate assert_matches;
#[macro_use]
extern crate serde_derive;

View File

@ -75,7 +75,6 @@ features = ["lz4"]
[dev-dependencies]
bs58 = { workspace = true }
matches = { workspace = true }
solana-account-decoder = { workspace = true }
solana-logger = { workspace = true }
test-case = { workspace = true }

View File

@ -1859,7 +1859,7 @@ pub mod tests {
create_genesis_config, create_genesis_config_with_leader, GenesisConfigInfo,
},
},
matches::assert_matches,
assert_matches::assert_matches,
rand::{thread_rng, Rng},
solana_entry::entry::{create_ticks, next_entry, next_entry_mut},
solana_program_runtime::declare_process_instruction,

View File

@ -1031,8 +1031,8 @@ pub fn verify_test_data_shred(
mod tests {
use {
super::*,
assert_matches::assert_matches,
bincode::serialized_size,
matches::assert_matches,
rand::Rng,
rand_chacha::{rand_core::SeedableRng, ChaChaRng},
solana_sdk::{shred_version, signature::Signer, signer::keypair::keypair_from_seed},

View File

@ -330,7 +330,7 @@ mod test {
use {
super::*,
crate::shred::{shred_code::MAX_CODE_SHREDS_PER_SLOT, ShredType, MAX_DATA_SHREDS_PER_SLOT},
matches::assert_matches,
assert_matches::assert_matches,
};
#[test]

View File

@ -1052,8 +1052,8 @@ mod test {
use {
super::*,
crate::shred::{ShredFlags, ShredId, SignedData},
assert_matches::assert_matches,
itertools::Itertools,
matches::assert_matches,
rand::{seq::SliceRandom, CryptoRng, Rng},
rayon::ThreadPoolBuilder,
solana_sdk::signature::{Keypair, Signer},

View File

@ -472,8 +472,8 @@ mod tests {
ShredType, MAX_CODE_SHREDS_PER_SLOT,
},
},
assert_matches::assert_matches,
bincode::serialized_size,
matches::assert_matches,
rand::{seq::SliceRandom, Rng},
solana_sdk::{
hash::{hash, Hash},

View File

@ -465,7 +465,7 @@ mod tests {
shred::{ProcessShredsStats, Shred, ShredFlags, LEGACY_SHRED_DATA_CAPACITY},
shredder::{ReedSolomonCache, Shredder},
},
matches::assert_matches,
assert_matches::assert_matches,
rand::{seq::SliceRandom, Rng},
rayon::ThreadPoolBuilder,
solana_entry::entry::Entry,

View File

@ -13,10 +13,6 @@ edition = { workspace = true }
fast-math = { workspace = true }
solana-program = { workspace = true }
# This can go once the SBF toolchain target Rust 1.42.0+
[target.bpfel-unknown-unknown.dependencies]
matches = { workspace = true }
[dev-dependencies]
hex = { workspace = true }

View File

@ -1,8 +1,4 @@
#![allow(clippy::arithmetic_side_effects)]
#[cfg(target_os = "solana")]
#[macro_use]
extern crate matches;
pub mod merkle_tree;
pub use merkle_tree::MerkleTree;

View File

@ -35,7 +35,7 @@ nix = { workspace = true }
name = "solana_perf"
[dev-dependencies]
matches = { workspace = true }
assert_matches = { workspace = true }
rand_chacha = { workspace = true }
solana-logger = { workspace = true }
test-case = { workspace = true }

View File

@ -18,7 +18,7 @@ extern crate log;
#[cfg(test)]
#[macro_use]
extern crate matches;
extern crate assert_matches;
#[macro_use]
extern crate solana_metrics;

View File

@ -22,8 +22,8 @@ solana-sdk = { workspace = true }
thiserror = { workspace = true }
[dev-dependencies]
assert_matches = { workspace = true }
bincode = { workspace = true }
matches = { workspace = true }
rand = { workspace = true }
solana-logger = { workspace = true }
solana-perf = { workspace = true }

View File

@ -8,4 +8,4 @@ extern crate solana_metrics;
#[cfg(test)]
#[macro_use]
extern crate matches;
extern crate assert_matches;

View File

@ -5012,6 +5012,7 @@ dependencies = [
name = "solana-gossip"
version = "1.17.0"
dependencies = [
"assert_matches",
"bincode",
"bv",
"clap 2.33.3",
@ -5021,7 +5022,6 @@ dependencies = [
"itertools",
"log",
"lru",
"matches",
"num-traits",
"rand 0.8.5",
"rand_chacha 0.3.1",
@ -5151,7 +5151,6 @@ name = "solana-merkle-tree"
version = "1.17.0"
dependencies = [
"fast-math",
"matches",
"solana-program",
]

View File

@ -41,7 +41,7 @@ thiserror = { workspace = true }
tokio = { workspace = true }
[dev-dependencies]
matches = { workspace = true }
assert_matches = { workspace = true }
solana-logger = { workspace = true }
[[bench]]

View File

@ -14,4 +14,4 @@ extern crate solana_metrics;
#[cfg(test)]
#[macro_use]
extern crate matches;
extern crate assert_matches;