File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ - Add ` Into<sockaddr_in> ` for ` SockaddrIn `
2
+ - Add ` Into<sockaddr_in6> ` for ` SockaddrIn6 `
Original file line number Diff line number Diff line change @@ -920,6 +920,15 @@ impl From<SockaddrIn> for net::SocketAddrV4 {
920
920
}
921
921
922
922
#[ cfg( feature = "net" ) ]
923
+ #[ allow( clippy:: from_over_into) ]
924
+ impl Into < libc:: sockaddr_in > for SockaddrIn {
925
+ fn into ( self ) -> libc:: sockaddr_in {
926
+ self . 0
927
+ }
928
+ }
929
+
930
+ #[ cfg( feature = "net" ) ]
931
+ #[ allow( clippy:: from_over_into) ]
923
932
impl std:: str:: FromStr for SockaddrIn {
924
933
type Err = net:: AddrParseError ;
925
934
@@ -969,6 +978,13 @@ impl SockaddrIn6 {
969
978
}
970
979
}
971
980
981
+ #[ cfg( feature = "net" ) ]
982
+ impl Into < libc:: sockaddr_in6 > for SockaddrIn6 {
983
+ fn into ( self ) -> libc:: sockaddr_in6 {
984
+ self . 0
985
+ }
986
+ }
987
+
972
988
#[ cfg( feature = "net" ) ]
973
989
impl private:: SockaddrLikePriv for SockaddrIn6 { }
974
990
#[ cfg( feature = "net" ) ]
You can’t perform that action at this time.
0 commit comments