Skip to content

Commit 5cc3de6

Browse files
mkroeningIsaacWoods
authored andcommitted
feat: implement Copy for all types that already implement Clone
Signed-off-by: Martin Kröning <[email protected]>
1 parent 42679e4 commit 5cc3de6

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/capability/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod msix;
88
pub use msi::{MsiCapability, MultipleMessageSupport, TriggerMode};
99
pub use msix::MsixCapability;
1010

11-
#[derive(Clone)]
11+
#[derive(Clone, Copy)]
1212
pub struct PciCapabilityAddress {
1313
pub address: PciAddress,
1414
pub offset: u16,
@@ -21,7 +21,7 @@ impl core::fmt::Debug for PciCapabilityAddress {
2121
}
2222

2323
/// PCI capabilities
24-
#[derive(Clone, Debug)]
24+
#[derive(Clone, Copy, Debug)]
2525
pub enum PciCapability {
2626
/// Power management capability, Cap ID = `0x01`
2727
PowerManagement(PciCapabilityAddress),

src/capability/msi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub enum TriggerMode {
4545
LevelDeassert = 0b10,
4646
}
4747

48-
#[derive(Debug, Clone)]
48+
#[derive(Debug, Clone, Copy)]
4949
pub struct MsiCapability {
5050
address: PciCapabilityAddress,
5151
per_vector_masking: bool,

src/capability/msix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::PciCapabilityAddress;
22
use crate::ConfigRegionAccess;
33
use bit_field::BitField;
44

5-
#[derive(Clone, Debug)]
5+
#[derive(Clone, Copy, Debug)]
66
pub struct MsixCapability {
77
address: PciCapabilityAddress,
88
table_size: u16,

src/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::{
66

77
/// Slowest time that a device will assert DEVSEL# for any bus command except Configuration Space
88
/// read and writes
9-
#[derive(Clone, Debug, Eq, PartialEq)]
9+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
1010
pub enum DevselTiming {
1111
Fast = 0x0,
1212
Medium = 0x1,

0 commit comments

Comments
 (0)