mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 10:26:29 +03:00
Derive Default where possible
This commit is contained in:
@@ -27,9 +27,10 @@ pub enum Connectivity {
|
||||
// the top) take priority. This means that e.g. if any folder has an error - usually
|
||||
// because there is no internet connection - the connectivity for the whole
|
||||
// account will be `Notconnected`.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, EnumProperty, PartialOrd)]
|
||||
#[derive(Debug, Default, Clone, PartialEq, Eq, EnumProperty, PartialOrd)]
|
||||
enum DetailedConnectivity {
|
||||
Error(String),
|
||||
#[default]
|
||||
Uninitialized,
|
||||
Connecting,
|
||||
Working,
|
||||
@@ -40,12 +41,6 @@ enum DetailedConnectivity {
|
||||
NotConfigured,
|
||||
}
|
||||
|
||||
impl Default for DetailedConnectivity {
|
||||
fn default() -> Self {
|
||||
DetailedConnectivity::Uninitialized
|
||||
}
|
||||
}
|
||||
|
||||
impl DetailedConnectivity {
|
||||
fn to_basic(&self) -> Option<Connectivity> {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user