File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ bitstring = ["dep:bitstring"]
2626serde = [" dep:serde" ]
2727
2828[dependencies ]
29- bitstring = { version = " 0.1 .0" , optional = true }
29+ bitstring = { version = " 0.2 .0" , optional = true , features = [ " net " ] }
3030serde = { version = " 1.0.27" , optional = true }
3131
3232[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -71,7 +71,10 @@ macro_rules! impl_cidr_for {
7171
7272 fn shared_prefix_len( & self , other: & Self ) -> usize {
7373 let max_len = core:: cmp:: min( self . network_length, other. network_length) as usize ;
74- FixedBitString :: shared_prefix_len( & self . address, & other. address, max_len)
74+ core:: cmp:: min(
75+ FixedBitString :: shared_prefix_len( & self . address, & other. address) ,
76+ max_len,
77+ )
7578 }
7679 }
7780
Original file line number Diff line number Diff line change @@ -68,7 +68,10 @@ macro_rules! impl_inet_for {
6868
6969 fn shared_prefix_len( & self , other: & Self ) -> usize {
7070 let max_len = core:: cmp:: min( self . network_length, other. network_length) as usize ;
71- FixedBitString :: shared_prefix_len( & self . address, & other. address, max_len)
71+ core:: cmp:: min(
72+ FixedBitString :: shared_prefix_len( & self . address, & other. address) ,
73+ max_len,
74+ )
7275 }
7376 }
7477
You can’t perform that action at this time.
0 commit comments