Skip to content

Commit e6f4e62

Browse files
committed
feat: Add Eq, and PartialEq impls to various types
1 parent 5e1afbe commit e6f4e62

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lib.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub mod log;
108108
pub mod tracing;
109109

110110
/// Logging flags to `#[command(flatten)]` into your CLI
111-
#[derive(clap::Args, Debug, Clone, Copy, Default)]
111+
#[derive(clap::Args, Debug, Clone, Copy, Default, PartialEq, Eq)]
112112
#[command(about = None, long_about = None)]
113113
pub struct Verbosity<L: LogLevel = ErrorLevel> {
114114
#[arg(
@@ -277,7 +277,7 @@ impl fmt::Display for VerbosityFilter {
277277
}
278278

279279
/// Default to [`VerbosityFilter::Error`]
280-
#[derive(Copy, Clone, Debug, Default)]
280+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
281281
pub struct ErrorLevel;
282282

283283
impl LogLevel for ErrorLevel {
@@ -287,7 +287,7 @@ impl LogLevel for ErrorLevel {
287287
}
288288

289289
/// Default to [`VerbosityFilter::Warn`]
290-
#[derive(Copy, Clone, Debug, Default)]
290+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
291291
pub struct WarnLevel;
292292

293293
impl LogLevel for WarnLevel {
@@ -297,7 +297,7 @@ impl LogLevel for WarnLevel {
297297
}
298298

299299
/// Default to [`VerbosityFilter::Info`]
300-
#[derive(Copy, Clone, Debug, Default)]
300+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
301301
pub struct InfoLevel;
302302

303303
impl LogLevel for InfoLevel {
@@ -307,7 +307,7 @@ impl LogLevel for InfoLevel {
307307
}
308308

309309
/// Default to [`VerbosityFilter::Debug`]
310-
#[derive(Copy, Clone, Debug, Default)]
310+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
311311
pub struct DebugLevel;
312312

313313
impl LogLevel for DebugLevel {
@@ -317,7 +317,7 @@ impl LogLevel for DebugLevel {
317317
}
318318

319319
/// Default to [`VerbosityFilter::Trace`]
320-
#[derive(Copy, Clone, Debug, Default)]
320+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
321321
pub struct TraceLevel;
322322

323323
impl LogLevel for TraceLevel {
@@ -327,7 +327,7 @@ impl LogLevel for TraceLevel {
327327
}
328328

329329
/// Default to [`VerbosityFilter::Off`] (no logging)
330-
#[derive(Copy, Clone, Debug, Default)]
330+
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
331331
pub struct OffLevel;
332332

333333
impl LogLevel for OffLevel {

0 commit comments

Comments
 (0)