@@ -48,18 +48,17 @@ macro_rules! redis_command {
48
48
return $crate:: raw:: Status :: Err as c_int;
49
49
}
50
50
51
- let command =
52
- unsafe { $crate:: raw:: RedisModule_GetCommand . unwrap( ) ( $ctx, name. as_ptr( ) ) } ;
53
- if command. is_null( ) {
54
- $crate:: raw:: redis_log(
55
- $ctx,
56
- & format!( "Error: failed to get command {}" , $command_name) ,
57
- ) ;
58
- return $crate:: raw:: Status :: Err as c_int;
59
- }
60
-
61
51
let mandatory = AclCategory :: from( $mandatory_acl_categories) ;
62
52
if let Some ( RM_SetCommandACLCategories ) = $crate:: raw:: RedisModule_SetCommandACLCategories {
53
+ let command =
54
+ unsafe { $crate:: raw:: RedisModule_GetCommand . unwrap( ) ( $ctx, name. as_ptr( ) ) } ;
55
+ if command. is_null( ) {
56
+ $crate:: raw:: redis_log(
57
+ $ctx,
58
+ & format!( "Error: failed to get command {}" , $command_name) ,
59
+ ) ;
60
+ return $crate:: raw:: Status :: Err as c_int;
61
+ }
63
62
let mut optional_failed = true ;
64
63
let mut acl_categories = CString :: default ( ) ;
65
64
$(
@@ -417,7 +416,9 @@ macro_rules! redis_module {
417
416
register_enum_configuration( & context, $enum_configuration_name, $enum_configuration_val, default , $enum_flags_options, $enum_on_changed) ;
418
417
) *
419
418
) ?
420
- raw:: RedisModule_LoadConfigs . unwrap( ) ( ctx) ;
419
+ if let Some ( load_config) = raw:: RedisModule_LoadConfigs {
420
+ load_config( ctx) ;
421
+ }
421
422
422
423
$(
423
424
$crate:: redis_command!( ctx, $module_config_get_command, |ctx, args: Vec <RedisString >| {
0 commit comments