Skip to content

Commit efc6ffc

Browse files
committed
Derive Default for Mailbox instead of implementing it
Fixes nightly clippy warning about derivable Default.
1 parent 6572bdf commit efc6ffc

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/types/mailbox.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::fmt;
33

44
/// Meta-information about an IMAP mailbox, as returned by
55
/// [`SELECT`](https://tools.ietf.org/html/rfc3501#section-6.3.1) and friends.
6-
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
6+
#[derive(Clone, Debug, Eq, PartialEq, Hash, Default)]
77
pub struct Mailbox {
88
/// Defined flags in the mailbox. See the description of the [FLAGS
99
/// response](https://tools.ietf.org/html/rfc3501#section-7.2.6) for more detail.
@@ -37,20 +37,6 @@ pub struct Mailbox {
3737
pub uid_validity: Option<u32>,
3838
}
3939

40-
impl Default for Mailbox {
41-
fn default() -> Mailbox {
42-
Mailbox {
43-
flags: Vec::new(),
44-
exists: 0,
45-
recent: 0,
46-
unseen: None,
47-
permanent_flags: Vec::new(),
48-
uid_next: None,
49-
uid_validity: None,
50-
}
51-
}
52-
}
53-
5440
impl fmt::Display for Mailbox {
5541
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5642
write!(

0 commit comments

Comments
 (0)