# HG changeset patch # User Paul Fisher # Date 1751182559 14400 # Node ID 1e11a52b466596f22250d9202213a571d53b9dc0 # Parent 93d423b65555b1f6330d6bd3be59927875611927 Don't promise ordering for the log level. diff -r 93d423b65555 -r 1e11a52b4665 src/logging.rs --- a/src/logging.rs Sun Jun 29 03:30:51 2025 -0400 +++ b/src/logging.rs Sun Jun 29 03:35:59 2025 -0400 @@ -36,9 +36,9 @@ /// The levels are in descending order of importance and correspond roughly /// to the similarly-named levels in the `log` crate. /// -/// In all implementations, these are ordered such that `Error`, `Warning`, -/// `Info`, and `Debug` are in ascending order. -#[derive(Debug, PartialEq, Ord, PartialOrd, Eq)] +/// Their values are ordered monotonically, either increasing or decreasing, +/// depending upon the implementation. +#[derive(Debug, PartialEq, Eq)] #[repr(i32)] pub enum Level { Error = levels::ERROR, @@ -144,13 +144,6 @@ use std::cell::RefCell; #[test] - fn test_order() { - assert!(Level::Error < Level::Warning); - assert!(Level::Warning < Level::Info); - assert!(Level::Info < Level::Debug); - } - - #[test] fn test_logging() { struct Logger(RefCell>);