Skip to content

Commit 23cb18b

Browse files
authored
set s as const (#167)
1 parent 3f3ae69 commit 23cb18b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/raw.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ pub fn list_pop(key: *mut RedisModuleKey, list_where: Where) -> *mut RedisModule
416416

417417
// Returns pointer to the C string, and sets len to its length
418418
#[allow(clippy::not_unsafe_ptr_arg_deref)]
419-
pub fn string_ptr_len(s: *mut RedisModuleString, len: *mut size_t) -> *const c_char {
419+
pub fn string_ptr_len(s: *const RedisModuleString, len: *mut size_t) -> *const c_char {
420420
unsafe { RedisModule_StringPtrLen.unwrap()(s, len) }
421421
}
422422

@@ -426,12 +426,12 @@ pub fn string_retain_string(ctx: *mut RedisModuleCtx, s: *mut RedisModuleString)
426426
}
427427

428428
#[allow(clippy::not_unsafe_ptr_arg_deref)]
429-
pub fn string_to_longlong(s: *mut RedisModuleString, len: *mut i64) -> Status {
429+
pub fn string_to_longlong(s: *const RedisModuleString, len: *mut i64) -> Status {
430430
unsafe { RedisModule_StringToLongLong.unwrap()(s, len).into() }
431431
}
432432

433433
#[allow(clippy::not_unsafe_ptr_arg_deref)]
434-
pub fn string_to_double(s: *mut RedisModuleString, len: *mut f64) -> Status {
434+
pub fn string_to_double(s: *const RedisModuleString, len: *mut f64) -> Status {
435435
unsafe { RedisModule_StringToDouble.unwrap()(s, len).into() }
436436
}
437437

0 commit comments

Comments
 (0)