@@ -51,21 +51,17 @@ pub type sctp_assoc_t = u32;
51
51
pub type eventfd_t = u64 ;
52
52
53
53
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
54
+ #[ derive( Clone , Copy ) ]
54
55
#[ repr( u32 ) ]
55
56
pub enum devstat_support_flags {
56
57
DEVSTAT_ALL_SUPPORTED = 0x00 ,
57
58
DEVSTAT_NO_BLOCKSIZE = 0x01 ,
58
59
DEVSTAT_NO_ORDERED_TAGS = 0x02 ,
59
60
DEVSTAT_BS_UNAVAILABLE = 0x04 ,
60
61
}
61
- impl Copy for devstat_support_flags { }
62
- impl Clone for devstat_support_flags {
63
- fn clone ( & self ) -> devstat_support_flags {
64
- * self
65
- }
66
- }
67
62
68
63
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
64
+ #[ derive( Clone , Copy ) ]
69
65
#[ repr( u32 ) ]
70
66
pub enum devstat_trans_flags {
71
67
DEVSTAT_NO_DATA = 0x00 ,
@@ -74,44 +70,28 @@ pub enum devstat_trans_flags {
74
70
DEVSTAT_FREE = 0x03 ,
75
71
}
76
72
77
- impl Copy for devstat_trans_flags { }
78
- impl Clone for devstat_trans_flags {
79
- fn clone ( & self ) -> devstat_trans_flags {
80
- * self
81
- }
82
- }
83
-
84
73
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
74
+ #[ derive( Clone , Copy ) ]
85
75
#[ repr( u32 ) ]
86
76
pub enum devstat_tag_type {
87
77
DEVSTAT_TAG_SIMPLE = 0x00 ,
88
78
DEVSTAT_TAG_HEAD = 0x01 ,
89
79
DEVSTAT_TAG_ORDERED = 0x02 ,
90
80
DEVSTAT_TAG_NONE = 0x03 ,
91
81
}
92
- impl Copy for devstat_tag_type { }
93
- impl Clone for devstat_tag_type {
94
- fn clone ( & self ) -> devstat_tag_type {
95
- * self
96
- }
97
- }
98
82
99
83
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
84
+ #[ derive( Clone , Copy ) ]
100
85
#[ repr( u32 ) ]
101
86
pub enum devstat_match_flags {
102
87
DEVSTAT_MATCH_NONE = 0x00 ,
103
88
DEVSTAT_MATCH_TYPE = 0x01 ,
104
89
DEVSTAT_MATCH_IF = 0x02 ,
105
90
DEVSTAT_MATCH_PASS = 0x04 ,
106
91
}
107
- impl Copy for devstat_match_flags { }
108
- impl Clone for devstat_match_flags {
109
- fn clone ( & self ) -> devstat_match_flags {
110
- * self
111
- }
112
- }
113
92
114
93
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
94
+ #[ derive( Clone , Copy ) ]
115
95
#[ repr( u32 ) ]
116
96
pub enum devstat_priority {
117
97
DEVSTAT_PRIORITY_MIN = 0x000 ,
@@ -125,14 +105,9 @@ pub enum devstat_priority {
125
105
DEVSTAT_PRIORITY_ARRAY = 0x120 ,
126
106
DEVSTAT_PRIORITY_MAX = 0xfff ,
127
107
}
128
- impl Copy for devstat_priority { }
129
- impl Clone for devstat_priority {
130
- fn clone ( & self ) -> devstat_priority {
131
- * self
132
- }
133
- }
134
108
135
109
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
110
+ #[ derive( Clone , Copy ) ]
136
111
#[ repr( u32 ) ]
137
112
pub enum devstat_type_flags {
138
113
DEVSTAT_TYPE_DIRECT = 0x000 ,
@@ -157,14 +132,9 @@ pub enum devstat_type_flags {
157
132
DEVSTAT_TYPE_IF_MASK = 0x0f0 ,
158
133
DEVSTAT_TYPE_PASS = 0x100 ,
159
134
}
160
- impl Copy for devstat_type_flags { }
161
- impl Clone for devstat_type_flags {
162
- fn clone ( & self ) -> devstat_type_flags {
163
- * self
164
- }
165
- }
166
135
167
136
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
137
+ #[ derive( Clone , Copy ) ]
168
138
#[ repr( u32 ) ]
169
139
pub enum devstat_metric {
170
140
DSM_NONE ,
@@ -214,27 +184,16 @@ pub enum devstat_metric {
214
184
DSM_TOTAL_BUSY_TIME ,
215
185
DSM_MAX ,
216
186
}
217
- impl Copy for devstat_metric { }
218
- impl Clone for devstat_metric {
219
- fn clone ( & self ) -> devstat_metric {
220
- * self
221
- }
222
- }
223
187
224
188
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Hash , PartialEq , Eq ) ) ]
189
+ #[ derive( Clone , Copy ) ]
225
190
#[ repr( u32 ) ]
226
191
pub enum devstat_select_mode {
227
192
DS_SELECT_ADD ,
228
193
DS_SELECT_ONLY ,
229
194
DS_SELECT_REMOVE ,
230
195
DS_SELECT_ADDONLY ,
231
196
}
232
- impl Copy for devstat_select_mode { }
233
- impl Clone for devstat_select_mode {
234
- fn clone ( & self ) -> devstat_select_mode {
235
- * self
236
- }
237
- }
238
197
239
198
s ! {
240
199
pub struct __c_anonymous_sigev_thread {
@@ -2600,6 +2559,7 @@ cfg_if! {
2600
2559
}
2601
2560
2602
2561
#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
2562
+ #[ derive( Clone , Copy ) ]
2603
2563
#[ repr( u32 ) ]
2604
2564
pub enum dot3Vendors {
2605
2565
dot3VendorAMD = 1 ,
@@ -2609,12 +2569,6 @@ pub enum dot3Vendors {
2609
2569
dot3VendorDigital = 6 ,
2610
2570
dot3VendorWesternDigital = 7 ,
2611
2571
}
2612
- impl Copy for dot3Vendors { }
2613
- impl Clone for dot3Vendors {
2614
- fn clone ( & self ) -> dot3Vendors {
2615
- * self
2616
- }
2617
- }
2618
2572
2619
2573
// aio.h
2620
2574
pub const LIO_VECTORED : c_int = 4 ;
0 commit comments