contain-rs / lru-cache

A cache that holds a limited number of key-value pairs
https://contain-rs.github.io/lru-cache/lru_cache/
Apache License 2.0
82 stars 36 forks source link

Assorted updates #16

Closed apasel422 closed 9 years ago

apasel422 commented 9 years ago

The most controversial part of this will be 9766baf, which is what I was going for with my comments in #15.

FlashCat commented 9 years ago

r? @reem

(I've picked a reviewer for you, use r? to override)

apasel422 commented 9 years ago

r? @Gankro

Gankra commented 9 years ago

It's not clear to me that renaming the method to _mut is valuable when there is no non-mut variant.

apasel422 commented 9 years ago

I was just going for consistency, but I can restore it to get if you'd prefer.

Gankra commented 9 years ago

via @cmr

1:58 PM <Elaine> So to me get :: Some Self Thing -> &T, get_mut :: Some Self Thing -> &mut T
1:59 PM <Elaine> get_mut is allowed to borrow refcells mutably etc
1:59 PM <Elaine> the receiver type is an irrelephant.
1:59 PM <Elaine> that's what I expect when I read code

So get_mut seems right