Skip to content

Commit 37e855d

Browse files
tisonkunSteveLauC
andauthored
Update src/syslog.rs
Co-authored-by: SteveLauC <[email protected]>
1 parent 72a4edd commit 37e855d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/syslog.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ impl LogMask {
138138

139139
/// Returns if the mask for the specified `priority` is set.
140140
pub fn contains(&self, priority: Severity) -> bool {
141-
let pri = priority as libc::c_int;
142-
(self.0 & (1 << pri)) != 0
141+
let priority = Self::of_priority(priority);
142+
let and_result = self & priority;
143+
and_result != 0
143144
}
144145
}
145146

0 commit comments

Comments
 (0)