Skip to content

Commit a1143f8

Browse files
removed clones which clippy found to be now unnecessary
1 parent b61784a commit a1143f8

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

libosdp/src/commands.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ impl From<OsdpCommand> for libosdp_sys::osdp_cmd {
546546
OsdpCommand::Buzzer(c) => libosdp_sys::osdp_cmd {
547547
id: libosdp_sys::osdp_cmd_e_OSDP_CMD_BUZZER,
548548
__bindgen_anon_1: libosdp_sys::osdp_cmd__bindgen_ty_1 {
549-
buzzer: c.clone().into(),
549+
buzzer: c.into(),
550550
},
551551
},
552552
OsdpCommand::Text(c) => libosdp_sys::osdp_cmd {
@@ -558,13 +558,13 @@ impl From<OsdpCommand> for libosdp_sys::osdp_cmd {
558558
OsdpCommand::Output(c) => libosdp_sys::osdp_cmd {
559559
id: libosdp_sys::osdp_cmd_e_OSDP_CMD_OUTPUT,
560560
__bindgen_anon_1: libosdp_sys::osdp_cmd__bindgen_ty_1 {
561-
output: c.clone().into(),
561+
output: c.into(),
562562
},
563563
},
564564
OsdpCommand::ComSet(c) => libosdp_sys::osdp_cmd {
565565
id: libosdp_sys::osdp_cmd_e_OSDP_CMD_COMSET,
566566
__bindgen_anon_1: libosdp_sys::osdp_cmd__bindgen_ty_1 {
567-
comset: c.clone().into(),
567+
comset: c.into(),
568568
},
569569
},
570570
OsdpCommand::KeySet(c) => libosdp_sys::osdp_cmd {
@@ -582,13 +582,13 @@ impl From<OsdpCommand> for libosdp_sys::osdp_cmd {
582582
OsdpCommand::FileTx(c) => libosdp_sys::osdp_cmd {
583583
id: libosdp_sys::osdp_cmd_e_OSDP_CMD_FILE_TX,
584584
__bindgen_anon_1: libosdp_sys::osdp_cmd__bindgen_ty_1 {
585-
file_tx: c.clone().into(),
585+
file_tx: c.into(),
586586
},
587587
},
588588
OsdpCommand::Status(c) => libosdp_sys::osdp_cmd {
589589
id: libosdp_sys::osdp_cmd_e_OSDP_CMD_STATUS,
590590
__bindgen_anon_1: libosdp_sys::osdp_cmd__bindgen_ty_1 {
591-
status: c.clone().into(),
591+
status: c.into(),
592592
},
593593
},
594594
}

libosdp/src/events.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl From<OsdpEventCardRead> for libosdp_sys::osdp_event_cardread {
146146
data[..value.data.len()].copy_from_slice(&value.data[..]);
147147
libosdp_sys::osdp_event_cardread {
148148
reader_no: value.reader_no,
149-
format: value.format.clone().into(),
149+
format: value.format.into(),
150150
direction: value.direction as i32,
151151
length,
152152
data,
@@ -389,7 +389,7 @@ impl From<OsdpEvent> for libosdp_sys::osdp_event {
389389
OsdpEvent::Status(e) => libosdp_sys::osdp_event {
390390
type_: libosdp_sys::osdp_event_type_OSDP_EVENT_STATUS,
391391
__bindgen_anon_1: libosdp_sys::osdp_event__bindgen_ty_1 {
392-
status: e.clone().into(),
392+
status: e.into(),
393393
},
394394
},
395395
}

libosdp/src/pdinfo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl PdInfoBuilder {
8282
/// received a `CMD_ID`. For CP mode, this field is ignored, but PD mode
8383
/// must set
8484
pub fn id(mut self, id: &PdId) -> PdInfoBuilder {
85-
self.id = id.clone();
85+
self.id = *id;
8686
self
8787
}
8888

@@ -147,7 +147,7 @@ impl PdInfo {
147147
baud_rate: self.baud_rate,
148148
address: self.address,
149149
flags: self.flags.bits() as i32,
150-
id: self.id.clone().into(),
150+
id: self.id.into(),
151151
cap: self.cap.as_ptr(),
152152
channel: self.channel.take().unwrap().into(),
153153
scbk,

0 commit comments

Comments
 (0)