Skip to content

Commit a486d3b

Browse files
author
meir
committed
review fixes
1 parent fb93663 commit a486d3b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/context/call_reply.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,10 @@ pub struct FutureHandler<C: FnOnce(&Context, CallResult<'static>)> {
716716
reply_freed: bool,
717717
}
718718

719-
impl<C: FnOnce(&Context, CallResult<'static>)> FutureHandler<C> {
719+
impl<C> FutureHandler<C>
720+
where
721+
C: FnOnce(&Context, CallResult<'static>),
722+
{
720723
/// Dispose the future, handler. This function must be called in order to
721724
/// release the [FutureHandler]. The reason we must have a dispose function
722725
/// and we can not use the Drop is that [FutureHandler] must be released
@@ -736,7 +739,7 @@ impl<C: FnOnce(&Context, CallResult<'static>)> FutureHandler<C> {
736739
lock_indicator: &LockIndicator,
737740
) -> Status {
738741
let mut callback: *mut C = std::ptr::null_mut();
739-
let res = unsafe{
742+
let res = unsafe {
740743
RedisModule_CallReplyPromiseAbort
741744
.expect("RedisModule_CallReplyPromiseAbort is expected to be available if we got a promise call reply")
742745
(self.reply.as_ptr(), &mut callback as *mut *mut C as *mut *mut c_void)

0 commit comments

Comments
 (0)