mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Merge pull request #307 from dongcarl/2019-02-derive-partialeq
util: Derive PartialEq for Level
This commit is contained in:
commit
788bd915c4
1 changed files with 1 additions and 8 deletions
|
@ -21,7 +21,7 @@ use std::sync::Arc;
|
|||
static LOG_LEVEL_NAMES: [&'static str; 6] = ["OFF", "ERROR", "WARN", "INFO", "DEBUG", "TRACE"];
|
||||
|
||||
/// An enum representing the available verbosity levels of the logger.
|
||||
#[derive(Copy, Clone, Eq, Debug, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
|
||||
pub enum Level {
|
||||
///Designates logger being silent
|
||||
Off,
|
||||
|
@ -37,13 +37,6 @@ pub enum Level {
|
|||
Trace,
|
||||
}
|
||||
|
||||
impl PartialEq for Level {
|
||||
#[inline]
|
||||
fn eq(&self, other: &Level) -> bool {
|
||||
*self as usize == *other as usize
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd for Level {
|
||||
#[inline]
|
||||
fn partial_cmp(&self, other: &Level) -> Option<cmp::Ordering> {
|
||||
|
|
Loading…
Add table
Reference in a new issue