Skip to content

Commit a0d8e21

Browse files
authored
Merge pull request #640 from henriiik/hs/add-send-and-sync-to-state-machine-squential
Add Send + Sync bounds to proptest_state_machine::strategy:Sequential
2 parents d7a5d5a + 90b726c commit a0d8e21

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

proptest-state-machine/src/strategy.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ pub trait ReferenceStateMachine: 'static {
140140
/// any.
141141
pub struct Sequential<State, Transition, StateStrategy, TransitionStrategy> {
142142
size: SizeRange,
143-
init_state: Arc<dyn Fn() -> StateStrategy>,
144-
preconditions: Arc<dyn Fn(&State, &Transition) -> bool>,
145-
transitions: Arc<dyn Fn(&State) -> TransitionStrategy>,
146-
next: Arc<dyn Fn(State, &Transition) -> State>,
143+
init_state: Arc<dyn Fn() -> StateStrategy + Send + Sync>,
144+
preconditions: Arc<dyn Fn(&State, &Transition) -> bool + Send + Sync>,
145+
transitions: Arc<dyn Fn(&State) -> TransitionStrategy + Send + Sync>,
146+
next: Arc<dyn Fn(State, &Transition) -> State + Send + Sync>,
147147
}
148148

149149
impl<State, Transition, StateStrategy, TransitionStrategy>
@@ -156,10 +156,10 @@ where
156156
{
157157
pub fn new(
158158
size: SizeRange,
159-
init_state: impl Fn() -> StateStrategy + 'static,
160-
preconditions: impl Fn(&State, &Transition) -> bool + 'static,
161-
transitions: impl Fn(&State) -> TransitionStrategy + 'static,
162-
next: impl Fn(State, &Transition) -> State + 'static,
159+
init_state: impl Fn() -> StateStrategy + 'static + Send + Sync,
160+
preconditions: impl Fn(&State, &Transition) -> bool + 'static + Send + Sync,
161+
transitions: impl Fn(&State) -> TransitionStrategy + 'static + Send + Sync,
162+
next: impl Fn(State, &Transition) -> State + 'static + Send + Sync,
163163
) -> Self {
164164
Self {
165165
size,

0 commit comments

Comments
 (0)