From 71db5f15992f11c60d87da583243445f8489424a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Sat, 11 Jan 2025 12:31:17 +0800 Subject: [PATCH] Chore: fix trait constrain for `external_state_machine_request()` Add missing trait constrain `SM: RaftStateMachine` to `external_state_machine_request()`. - Mentioned in https://github.com/databendlabs/openraft/pull/1206#discussion_r1909951691 Thanks to @SteveLauC --- openraft/src/raft/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openraft/src/raft/mod.rs b/openraft/src/raft/mod.rs index 19d03ab43..fd1dc350f 100644 --- a/openraft/src/raft/mod.rs +++ b/openraft/src/raft/mod.rs @@ -952,7 +952,7 @@ where C: RaftTypeConfig #[since(version = "0.10.0")] pub fn external_state_machine_request(&self, req: F) where - SM: 'static, + SM: RaftStateMachine, F: FnOnce(&mut SM) -> BoxFuture<()> + OptionalSend + 'static, { let input_sm_type = std::any::type_name::();