Skip to content

Commit c607a27

Browse files
committed
Apply new clippy lint
1 parent 309147d commit c607a27

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ impl ResetHandle {
214214
/// What the [`Logger`] can cache.
215215
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
216216
#[non_exhaustive]
217+
#[derive(Default)]
217218
pub enum Caching {
218219
/// Disables caching.
219220
///
@@ -234,15 +235,10 @@ pub enum Caching {
234235
/// Therefore, once a `Logger` has been cached, it is possible to decide on the Rust side if a
235236
/// message would get logged or not. If the message is not to be logged, no Python code is
236237
/// called and the GIL doesn't have to be acquired.
238+
#[default]
237239
LoggersAndLevels,
238240
}
239241

240-
impl Default for Caching {
241-
fn default() -> Self {
242-
Caching::LoggersAndLevels
243-
}
244-
}
245-
246242
#[derive(Debug)]
247243
struct CacheEntry {
248244
filter: LevelFilter,

0 commit comments

Comments
 (0)