@@ -961,11 +961,6 @@ impl AsInner<c::in_addr> for Ipv4Addr {
961961 & self . inner
962962 }
963963}
964- impl FromInner < c:: in_addr > for Ipv4Addr {
965- fn from_inner ( addr : c:: in_addr ) -> Ipv4Addr {
966- Ipv4Addr { inner : addr }
967- }
968- }
969964
970965#[ stable( feature = "ip_u32" , since = "1.1.0" ) ]
971966impl From < Ipv4Addr > for u32 {
@@ -976,8 +971,8 @@ impl From<Ipv4Addr> for u32 {
976971 /// ```
977972 /// use std::net::Ipv4Addr;
978973 ///
979- /// let addr = Ipv4Addr::new(13, 12, 11, 10 );
980- /// assert_eq!(0x0d0c0b0au32 , u32::from(addr));
974+ /// let addr = Ipv4Addr::new(0xca, 0xfe, 0xba, 0xbe );
975+ /// assert_eq!(0xcafebabe , u32::from(addr));
981976 /// ```
982977 fn from ( ip : Ipv4Addr ) -> u32 {
983978 let ip = ip. octets ( ) ;
@@ -994,8 +989,8 @@ impl From<u32> for Ipv4Addr {
994989 /// ```
995990 /// use std::net::Ipv4Addr;
996991 ///
997- /// let addr = Ipv4Addr::from(0x0d0c0b0au32 );
998- /// assert_eq!(Ipv4Addr::new(13, 12, 11, 10 ), addr);
992+ /// let addr = Ipv4Addr::from(0xcafebabe );
993+ /// assert_eq!(Ipv4Addr::new(0xca, 0xfe, 0xba, 0xbe ), addr);
999994 /// ```
1000995 fn from ( ip : u32 ) -> Ipv4Addr {
1001996 Ipv4Addr :: from ( ip. to_be_bytes ( ) )
0 commit comments