Skip to content

Commit

Permalink
Chore: fix trait constrain for external_state_machine_request<SM>()
Browse files Browse the repository at this point in the history
Add missing trait constrain `SM: RaftStateMachine<C>` to
`external_state_machine_request<SM>()`.

- Mentioned in #1206 (comment)

Thanks to @SteveLauC
  • Loading branch information
drmingdrmer committed Jan 11, 2025
1 parent bcc3af2 commit 2f8a3c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openraft/src/raft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ where C: RaftTypeConfig
#[since(version = "0.10.0")]
pub fn external_state_machine_request<F, SM>(&self, req: F)
where
SM: 'static,
SM: RaftStateMachine<C>,
F: FnOnce(&mut SM) -> BoxFuture<()> + OptionalSend + 'static,
{
let input_sm_type = std::any::type_name::<SM>();
Expand Down

0 comments on commit 2f8a3c1

Please sign in to comment.