We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72a4edd commit 37e855dCopy full SHA for 37e855d
src/syslog.rs
@@ -138,8 +138,9 @@ impl LogMask {
138
139
/// Returns if the mask for the specified `priority` is set.
140
pub fn contains(&self, priority: Severity) -> bool {
141
- let pri = priority as libc::c_int;
142
- (self.0 & (1 << pri)) != 0
+ let priority = Self::of_priority(priority);
+ let and_result = self & priority;
143
+ and_result != 0
144
}
145
146
0 commit comments