Skip to content

Commit 9517a29

Browse files
committed
Fix the warning about getting an address of a static.
1 parent 3e08f9b commit 9517a29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/logging.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ pub mod standard_log_implementation {
157157
pub fn setup_for_context(context: *mut raw::RedisModuleCtx) -> Result<(), SetLoggerError> {
158158
unsafe {
159159
LOGGER.0 = context;
160-
log::set_logger(&LOGGER).map(|()| log::set_max_level(log::LevelFilter::Trace))
160+
log::set_logger(&*std::ptr::addr_of!(LOGGER))
161+
.map(|()| log::set_max_level(log::LevelFilter::Trace))
161162
}
162163
}
163164

0 commit comments

Comments
 (0)