Impl StoreCommand for boxed StoreCommand
Implement the `StoreCommand` trait for
`Box<dyn StoreCommand<Context = C>>`
@@ -30,3 +30,11 @@ pub trait StoreCommandExecutor {
store_commands: Vec<C>,
) -> Result<(), InternalError>;
}
+
+impl<C> StoreCommand for Box<dyn StoreCommand<Context = C>> {
+ type Context = C;
+
+ fn execute(&self, conn: &Self::Context) -> Result<(), InternalError> {
+ (&**self).execute(conn)
+ }
+}
