servo / uluru

A simple, fast, LRU cache implementation.
Mozilla Public License 2.0
190 stars 20 forks source link

Clean up API in preparation for future 2.0 release #15

Closed mbrubeck closed 3 years ago

mbrubeck commented 3 years ago

Change the names of a couple of methods to be consistent with other Rust libraries.

The old names are still available but marked as deprecated. They will be removed in the next major release.

Also mark front and front_mut as deprecated. These methods are not useful for external code, and will be made private in the next major release.

jdm commented 3 years ago

What's the purpose of the 1.1.0 change? Otherwise this looks fine.

mbrubeck commented 3 years ago

What's the purpose of the 1.1.0 change? Otherwise this looks fine.

I'd like to publish a release with this change, and I wanted to remember to bump the minor version because this adds new public methods.

jdm commented 3 years ago

Oops, I definitely misread the change. Looks good!

mbrubeck commented 3 years ago

Note: I pushed a quick fix to revert the deprecation of front and front_mut. I did this because, after releasing this change, I tried to update badgen to avoid the deprecated methods, and discovered that there is no way to convert this code to use find until Polonius is stabilized:

https://github.com/avitex/rust-badgen/blob/7dc43ee5c85d5f9c646d98381140afcda105567a/src/font.rs#L92-L93

I'd still like to remove these methods in a future release, but it will have to wait.