Open djahandarie opened 2 years ago
Hi @djahandarie - I take your point but a little leary of this one. At first glance, I'm not sure how to do it in an intuitive way that won't require a major API change. I'll think on it some more but also open to suggestions
An example implementation that maintains API compatibility: https://gist.github.com/rcloran/1b252ddcc1a0ee2c4530b217639635b1
There are a few downsides to doing it this way:
Of course, simply adding a new fn add_addr(..., : IpAddr)
(note no "ip") or some other name that makes sense would allow keeping the string version around but marked deprecated for a version.
I'd argue for breaking the API. I think it needs to break either as suggested in this issue or as in #34 . There are a couple of other places that I think would benefit from API changes, too.
Currently the API only accepts &strs, but that causes some ineffiencies in caller code if