Skip to content

Commit 974c013

Browse files
authored
Make futures crate optional in solana-type-overrides (anza-xyz#1792)
1 parent 6cf3225 commit 974c013

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

programs/sbf/Cargo.lock

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svm/src/transaction_processor.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,13 @@ use {
5353
transaction::{self, SanitizedTransaction, TransactionError},
5454
transaction_context::{ExecutionRecord, TransactionContext},
5555
},
56-
solana_type_overrides::sync::{atomic::Ordering, Arc, RwLock},
56+
solana_type_overrides::sync::{atomic::Ordering, Arc, RwLock, RwLockReadGuard},
5757
solana_vote::vote_account::VoteAccountsHashMap,
5858
std::{
5959
cell::RefCell,
6060
collections::{hash_map::Entry, HashMap, HashSet},
6161
fmt::{Debug, Formatter},
6262
rc::Rc,
63-
sync::RwLockReadGuard,
6463
},
6564
};
6665

type-overrides/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ license = { workspace = true }
99
edition = { workspace = true }
1010

1111
[dependencies]
12-
futures = { workspace = true }
12+
futures = { workspace = true, optional = true }
1313
lazy_static = { workspace = true }
1414
rand = { workspace = true }
1515
shuttle = { workspace = true, optional = true }
1616

1717
[features]
1818
shuttle-test = ["dep:shuttle"]
19+
executor = ["dep:futures"]

type-overrides/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
///
77
/// Instead of importing from std, rand, and so on, import the following from solana-type-override,
88
/// and include the 'shuttle-test' feature in your crate to use shuttle.
9+
10+
#[cfg(feature = "executor")]
911
pub mod executor {
1012
#[cfg(not(feature = "shuttle-test"))]
1113
pub use futures::executor::*;

0 commit comments

Comments
 (0)