Skip to content

Commit 125e49e

Browse files
authored
Fix reference to Context in redis_command macro (#109)
Errant identifier did not properly reference crate context, which made the results dependent on the namespace of the usage environment.
1 parent 40de540 commit 125e49e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/macros.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ macro_rules! redis_command {
1616
argv: *mut *mut $crate::raw::RedisModuleString,
1717
argc: c_int,
1818
) -> c_int {
19-
let context = Context::new(ctx);
19+
let context = $crate::Context::new(ctx);
2020

2121
let args_decoded: Result<Vec<_>, $crate::RedisError> =
2222
unsafe { slice::from_raw_parts(argv, argc as usize) }
2323
.into_iter()
2424
.map(|&arg| {
2525
$crate::RedisString::from_ptr(arg)
2626
.map(|v| v.to_owned())
27-
.map_err(|_|$crate::RedisError::Str(
28-
"UTF8 encoding error in handler args"))
27+
.map_err(|_| {
28+
$crate::RedisError::Str("UTF8 encoding error in handler args")
29+
})
2930
})
3031
.collect();
3132

0 commit comments

Comments
 (0)