Open Barre opened 4 years ago
Sorry, it took me a while to reply, and thanks for the PR. I still have to figure out a good workflow of deprecating APIs and removing them eventually. Hence I am not a fan of changing the behaviour of ip
right now.
@achanda I understand!
I'll update my PR with just the fix for is_subnet_of
in the next few days then.
Probably superseded by #177.
Fixes:
is_subnet_of
was broken if the supernet was not the network address.IpNetwork
..ip()
.Adds:
If there is no plans on breaking backwards compatibility, the
ip()
method should be re-introduced in my changes. Also, ifip
is not kept, there would be no need fornetwork()
to compute the network address anymore as the arithmetic can be done in the constructor and the resulting ip stored in the struct, discarding the originalIpAddr
.