Skip to content

Commit

Permalink
Remove semver breaking change (LogLevel: Clone)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed Sep 21, 2024
1 parent 2dda2ab commit 2caa27f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ pub use log::LevelFilter;
#[derive(clap::Args, Debug, Clone, Default, PartialEq, Eq)]
#[command(about = None, long_about = None)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(from = "LevelFilter", into = "LevelFilter"))]
#[cfg_attr(
feature = "serde",
serde(
from = "LevelFilter",
into = "LevelFilter",
bound(serialize = "L: Clone")
)
)]
pub struct Verbosity<L: LogLevel = ErrorLevel> {
#[arg(
long,
Expand Down Expand Up @@ -193,7 +200,7 @@ impl<L: LogLevel> From<LevelFilter> for Verbosity<L> {
}

/// Customize the default log-level and associated help
pub trait LogLevel: Clone {
pub trait LogLevel {
/// Base-line level before applying `--verbose` and `--quiet`
fn default() -> Option<Level>;

Expand Down

0 comments on commit 2caa27f

Please sign in to comment.