Skip to content

Commit ebb4269

Browse files
author
Alexander Krotov
committed
Derive Copy for Protocol
1 parent f774034 commit ebb4269

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/provider/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ use crate::{
99
provider::data::PROVIDER_DATA,
1010
};
1111

12-
#[derive(Debug, Copy, Clone, PartialEq, ToPrimitive)]
12+
#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313
#[repr(u8)]
1414
pub enum Status {
1515
OK = 1,
1616
PREPARATION = 2,
1717
BROKEN = 3,
1818
}
1919

20-
#[derive(Debug, PartialEq, Clone)]
20+
#[derive(Debug, PartialEq, Copy, Clone, FromPrimitive, ToPrimitive)]
2121
#[repr(u8)]
2222
pub enum Protocol {
2323
SMTP = 1,
@@ -86,8 +86,8 @@ impl Provider {
8686
.iter()
8787
.filter(|s| s.protocol == protocol)
8888
.map(|s| ServerParams {
89-
protocol: s.protocol.clone(),
90-
socket: s.socket.clone(),
89+
protocol: s.protocol,
90+
socket: s.socket,
9191
hostname: s.hostname.to_string(),
9292
port: s.port,
9393
username_pattern: s.username_pattern.clone(),

0 commit comments

Comments
 (0)