@@ -204,12 +204,12 @@ mod tests {
204204
205205 // 0.0.0.0/32 "This host on this network" [RFC1122], Section 3.2.1.3
206206 // 0.0.0.0/8 "This network" [RFC791], Section 3.2
207- const V4_THIS_NETWORK : & [ Ipv4Addr ] = & [ Ipv4Addr :: new ( 0 , 0 , 0 , 0 ) , Ipv4Addr :: new ( 0 , 255 , 255 , 255 ) ] ;
207+ const V4_THIS_NETWORK : & [ Ipv4Addr ] = & [ Ipv4Addr :: UNSPECIFIED , Ipv4Addr :: new ( 0 , 255 , 255 , 255 ) ] ;
208208
209209 // 127.0.0.0/8 Loopback [RFC1122] Section 3.2.1.3
210210 const V4_LOOPBACKS : & [ Ipv4Addr ] = & [
211211 Ipv4Addr :: new ( 127 , 0 , 0 , 0 ) ,
212- Ipv4Addr :: new ( 127 , 0 , 0 , 1 ) ,
212+ Ipv4Addr :: LOCALHOST ,
213213 Ipv4Addr :: new ( 127 , 255 , 255 , 255 ) ,
214214 ] ;
215215
@@ -240,7 +240,7 @@ mod tests {
240240 Ipv4Addr :: new ( 240 , 0 , 0 , 0 ) ,
241241 Ipv4Addr :: new ( 254 , 255 , 255 , 255 ) ,
242242 Ipv4Addr :: new ( 255 , 0 , 0 , 0 ) ,
243- Ipv4Addr :: new ( 255 , 255 , 255 , 255 ) ,
243+ Ipv4Addr :: BROADCAST ,
244244 ] ;
245245
246246 // ::ffff:0:0/96 IPv4-mapped Address [RFC4291]
@@ -270,7 +270,7 @@ mod tests {
270270 . chain ( V4_IETF_PROTOCOL_ASSIGNMENTS )
271271 . chain ( V4_DOCUMENTATION )
272272 . chain ( V4_RESERVED )
273- . cloned ( )
273+ . copied ( )
274274 }
275275
276276 fn yield_invalid_destination_ip4 ( ) -> impl Iterator < Item = Ipv4Addr > {
@@ -281,7 +281,7 @@ mod tests {
281281 . chain ( V4_DOCUMENTATION )
282282 . chain ( V4_RESERVED )
283283 . filter ( |ip| * * ip != Ipv4Addr :: BROADCAST )
284- . cloned ( )
284+ . copied ( )
285285 }
286286
287287 fn yield_invalid_forwardable_ip4 ( ) -> impl Iterator < Item = Ipv4Addr > {
@@ -293,25 +293,25 @@ mod tests {
293293
294294 // If the value of "Destination" is FALSE, the values of "Forwardable"
295295 // and "Globally Reachable" must also be false.
296- yield_invalid_destination_ip4 ( ) . chain ( OTHERS . iter ( ) . cloned ( ) )
296+ yield_invalid_destination_ip4 ( ) . chain ( OTHERS . iter ( ) . copied ( ) )
297297 }
298298
299299 fn yield_invalid_source_ip6 ( ) -> impl Iterator < Item = Ipv6Addr > {
300300 const OTHERS : & [ Ipv6Addr ] = & [ Ipv6Addr :: LOCALHOST ] ;
301301
302- V6_V4_MAPPED . iter ( ) . chain ( V6_DOCUMENTATION ) . chain ( OTHERS ) . cloned ( )
302+ V6_V4_MAPPED . iter ( ) . chain ( V6_DOCUMENTATION ) . chain ( OTHERS ) . copied ( )
303303 }
304304
305305 fn yield_invalid_destination_ip6 ( ) -> impl Iterator < Item = Ipv6Addr > {
306306 const OTHERS : & [ Ipv6Addr ] = & [ Ipv6Addr :: UNSPECIFIED , Ipv6Addr :: LOCALHOST ] ;
307307
308- V6_V4_MAPPED . iter ( ) . chain ( V6_DOCUMENTATION ) . chain ( OTHERS ) . cloned ( )
308+ V6_V4_MAPPED . iter ( ) . chain ( V6_DOCUMENTATION ) . chain ( OTHERS ) . copied ( )
309309 }
310310
311311 fn yield_invalid_forwardable_ip6 ( ) -> impl Iterator < Item = Ipv6Addr > {
312312 // If the value of "Destination" is FALSE, the values of "Forwardable"
313313 // and "Globally Reachable" must also be false.
314- yield_invalid_destination_ip6 ( ) . chain ( V6_LINK_LOCAL_UNICAST . iter ( ) . cloned ( ) )
314+ yield_invalid_destination_ip6 ( ) . chain ( V6_LINK_LOCAL_UNICAST . iter ( ) . copied ( ) )
315315 }
316316
317317 fn yield_valid_ip4 ( ) -> impl Iterator < Item = Ipv4Addr > {
0 commit comments