mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56:30 +03:00
Derive Default where possible
This commit is contained in:
@@ -61,6 +61,7 @@ pub enum ChatItem {
|
||||
/// Chat protection status.
|
||||
#[derive(
|
||||
Debug,
|
||||
Default,
|
||||
Display,
|
||||
Clone,
|
||||
Copy,
|
||||
@@ -77,6 +78,7 @@ pub enum ChatItem {
|
||||
#[repr(u32)]
|
||||
pub enum ProtectionStatus {
|
||||
/// Chat is not protected.
|
||||
#[default]
|
||||
Unprotected = 0,
|
||||
|
||||
/// Chat is protected.
|
||||
@@ -85,12 +87,6 @@ pub enum ProtectionStatus {
|
||||
Protected = 1,
|
||||
}
|
||||
|
||||
impl Default for ProtectionStatus {
|
||||
fn default() -> Self {
|
||||
ProtectionStatus::Unprotected
|
||||
}
|
||||
}
|
||||
|
||||
/// The reason why messages cannot be sent to the chat.
|
||||
///
|
||||
/// The reason is mainly for logging and displaying in debug REPL, thus not translated.
|
||||
|
||||
Reference in New Issue
Block a user