@@ -18,7 +18,8 @@ pub struct AddressMessageBuilder<T> {
1818}
1919
2020impl < T > AddressMessageBuilder < T > {
21- /// Create a new [AddressMessageBuilder] without specifying the address family.
21+ /// Create a new [AddressMessageBuilder] without specifying the address
22+ /// family.
2223 fn new_no_address_family ( ) -> Self {
2324 AddressMessageBuilder {
2425 message : AddressMessage :: default ( ) ,
@@ -38,6 +39,12 @@ impl<T> AddressMessageBuilder<T> {
3839 }
3940}
4041
42+ impl Default for AddressMessageBuilder < Ipv4Addr > {
43+ fn default ( ) -> Self {
44+ Self :: new ( )
45+ }
46+ }
47+
4148impl AddressMessageBuilder < Ipv4Addr > {
4249 /// Create a new [AddressMessageBuilder] for IPv4 addresses.
4350 pub fn new ( ) -> Self {
@@ -55,7 +62,8 @@ impl AddressMessageBuilder<Ipv4Addr> {
5562 . attributes
5663 . push ( AddressAttribute :: Address ( address. into ( ) ) ) ;
5764
58- // The IFA_LOCAL address can be set to the same value as IFA_ADDRESS.
65+ // The IFA_LOCAL address can be set to the same value as
66+ // IFA_ADDRESS.
5967 self . message
6068 . attributes
6169 . push ( AddressAttribute :: Local ( address. into ( ) ) ) ;
@@ -80,6 +88,12 @@ impl AddressMessageBuilder<Ipv4Addr> {
8088 }
8189}
8290
91+ impl Default for AddressMessageBuilder < Ipv6Addr > {
92+ fn default ( ) -> Self {
93+ Self :: new ( )
94+ }
95+ }
96+
8397impl AddressMessageBuilder < Ipv6Addr > {
8498 /// Create a new [AddressMessageBuilder] for IPv6 addresses.
8599 pub fn new ( ) -> Self {
@@ -101,7 +115,8 @@ impl AddressMessageBuilder<Ipv6Addr> {
101115 . attributes
102116 . push ( AddressAttribute :: Address ( address. into ( ) ) ) ;
103117
104- // The IFA_LOCAL address can be set to the same value as IFA_ADDRESS.
118+ // The IFA_LOCAL address can be set to the same value as
119+ // IFA_ADDRESS.
105120 self . message
106121 . attributes
107122 . push ( AddressAttribute :: Local ( address. into ( ) ) ) ;
0 commit comments