Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Joruk committed Apr 5, 2023
1 parent 8ed8ce2 commit 726ded4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Log for OsLogger {
let max_level = self
.loggers
.get(metadata.target())
.and_then(|pair| (*pair).0)
.and_then(|pair| pair.0)
.unwrap_or_else(log::max_level);

metadata.level() <= max_level
Expand All @@ -26,7 +26,7 @@ impl Log for OsLogger {
.or_insert((None, OsLog::new(&self.subsystem, record.target())));

let message = std::format!("{}", record.args());
(*pair).1.with_level(record.level().into(), &message);
pair.1.with_level(record.level().into(), &message);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ pub const OS_LOG_TYPE_DEBUG: os_log_type_t = 2;
pub const OS_LOG_TYPE_ERROR: os_log_type_t = 16;
pub const OS_LOG_TYPE_FAULT: os_log_type_t = 17;

/// Provided by the OS.
// Provided by the OS.
extern "C" {
pub fn os_log_create(subsystem: *const c_char, category: *const c_char) -> os_log_t;
pub fn os_release(object: *mut c_void);
pub fn os_log_type_enabled(log: os_log_t, level: os_log_type_t) -> bool;
}

/// Wrappers defined in wrapper.c because most of the os_log_* APIs are macros.
// Wrappers defined in wrapper.c because most of the os_log_* APIs are macros.
extern "C" {
pub fn wrapped_get_default_log() -> os_log_t;
pub fn wrapped_os_log_with_type(log: os_log_t, log_type: os_log_type_t, message: *const c_char);
Expand Down

0 comments on commit 726ded4

Please sign in to comment.