@@ -183,7 +183,7 @@ make_macro! {
183
183
// IpNetwork types
184
184
185
185
cfg_if:: cfg_if! {
186
- if #[ cfg( feature = "ipnet " ) ] {
186
+ if #[ cfg( feature = "ipnetwork " ) ] {
187
187
use ipnetwork:: { IpNetwork , Ipv4Network , Ipv6Network } ;
188
188
189
189
make_macro!{
@@ -198,7 +198,7 @@ cfg_if::cfg_if! {
198
198
quote! { ipnetwork:: IpNetwork :: V6 ( #inner) }
199
199
}
200
200
} ;
201
- "ipnet "
201
+ "ipnetwork "
202
202
}
203
203
204
204
make_macro!{
@@ -208,7 +208,7 @@ cfg_if::cfg_if! {
208
208
let prefix = net. prefix( ) ;
209
209
quote! { ipnetwork:: Ipv4Network :: new_checked( #ip, #prefix) . unwrap( ) }
210
210
} ;
211
- "ipnet "
211
+ "ipnetwork "
212
212
}
213
213
214
214
@@ -219,15 +219,15 @@ cfg_if::cfg_if! {
219
219
let prefix = net. prefix( ) ;
220
220
quote! { ipnetwork:: Ipv6Network :: new_checked( #ip, #prefix) . unwrap( ) }
221
221
} ;
222
- "ipnet "
222
+ "ipnetwork "
223
223
}
224
224
}
225
225
}
226
226
227
227
// MacAddr types
228
228
229
229
cfg_if:: cfg_if! {
230
- if #[ cfg( feature = "mac " ) ] {
230
+ if #[ cfg( feature = "macaddr " ) ] {
231
231
use macaddr:: { MacAddr , MacAddr6 , MacAddr8 } ;
232
232
233
233
make_macro!{
@@ -242,7 +242,7 @@ cfg_if::cfg_if! {
242
242
quote! { macaddr:: MacAddr :: V8 ( #inner) }
243
243
}
244
244
} ;
245
- "mac "
245
+ "macaddr "
246
246
}
247
247
248
248
make_macro! {
@@ -251,7 +251,7 @@ cfg_if::cfg_if! {
251
251
let bytes = addr. into_array( ) ;
252
252
quote! { macaddr:: MacAddr6 :: new( #( #bytes) , * ) }
253
253
} ;
254
- "mac "
254
+ "macaddr "
255
255
}
256
256
257
257
make_macro!{
@@ -260,7 +260,7 @@ cfg_if::cfg_if! {
260
260
let bytes = addr. into_array( ) ;
261
261
quote! { macaddr:: MacAddr8 :: new( #( #bytes) , * ) }
262
262
} ;
263
- "mac "
263
+ "macaddr "
264
264
}
265
265
}
266
266
}
@@ -278,13 +278,13 @@ mod tests {
278
278
t. compile_fail ( "tests/fail/sock4.rs" ) ;
279
279
t. compile_fail ( "tests/fail/sock6.rs" ) ;
280
280
281
- if cfg ! ( feature = "ipnet " ) {
281
+ if cfg ! ( feature = "ipnetwork " ) {
282
282
t. compile_fail ( "tests/fail/net.rs" ) ;
283
283
t. compile_fail ( "tests/fail/net4.rs" ) ;
284
284
t. compile_fail ( "tests/fail/net6.rs" ) ;
285
285
}
286
286
287
- if cfg ! ( feature = "mac " ) {
287
+ if cfg ! ( feature = "macaddr " ) {
288
288
t. compile_fail ( "tests/fail/mac.rs" ) ;
289
289
t. compile_fail ( "tests/fail/mac6.rs" ) ;
290
290
t. compile_fail ( "tests/fail/mac8.rs" ) ;
@@ -297,13 +297,13 @@ mod tests {
297
297
t. pass ( "tests/pass/sock4.rs" ) ;
298
298
t. pass ( "tests/pass/sock6.rs" ) ;
299
299
300
- if cfg ! ( feature = "ipnet " ) {
300
+ if cfg ! ( feature = "ipnetwork " ) {
301
301
t. pass ( "tests/pass/net.rs" ) ;
302
302
t. pass ( "tests/pass/net4.rs" ) ;
303
303
t. pass ( "tests/pass/net6.rs" ) ;
304
304
}
305
305
306
- if cfg ! ( feature = "mac " ) {
306
+ if cfg ! ( feature = "macaddr " ) {
307
307
t. pass ( "tests/pass/mac.rs" ) ;
308
308
t. pass ( "tests/pass/mac6.rs" ) ;
309
309
t. pass ( "tests/pass/mac8.rs" ) ;
0 commit comments