mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 06:46:35 +03:00
Derive Default where possible
This commit is contained in:
@@ -37,10 +37,11 @@ pub enum Protocol {
|
||||
}
|
||||
|
||||
/// Socket security.
|
||||
#[derive(Debug, Display, PartialEq, Eq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
||||
#[derive(Debug, Default, Display, PartialEq, Eq, Copy, Clone, FromPrimitive, ToPrimitive)]
|
||||
#[repr(u8)]
|
||||
pub enum Socket {
|
||||
/// Unspecified socket security, select automatically.
|
||||
#[default]
|
||||
Automatic = 0,
|
||||
|
||||
/// TLS connection.
|
||||
@@ -53,12 +54,6 @@ pub enum Socket {
|
||||
Plain = 3,
|
||||
}
|
||||
|
||||
impl Default for Socket {
|
||||
fn default() -> Self {
|
||||
Socket::Automatic
|
||||
}
|
||||
}
|
||||
|
||||
/// Pattern used to construct login usernames from email addresses.
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
#[repr(u8)]
|
||||
|
||||
Reference in New Issue
Block a user