Skip to content

Some changes to work better without mutability - #41

Closed
luser wants to merge 2 commits into
contain-rs:masterfrom
luser:non-mut-changes
Closed

luser wants to merge 2 commits into
contain-rs:masterfrom
luser:non-mut-changes

Conversation

@luser

@luser luser commented Dec 7, 2016

Copy link
Copy Markdown

I built something atop my changes in #40 and I wound up needing a pair of small additional changes:

  • First, I needed a get method that returned a non-mutable reference, since my changes in that PR make get_mut available only when using the default Count metric, so when using a different metric there's no way to actually get items from the cache. This differs from the immutable get PR in that it still updates the LRU state of the cache, it just returns a non-mutable reference to the cache entry.
  • Second, I wanted to use contains_key without having a mutable reference to the cache, which is pretty simple (maybe the underlying LinkedHashMap didn't implement contains_key when this code was originally written?)

@FlashCat

FlashCat commented Dec 7, 2016

Copy link
Copy Markdown
Contributor

Thanks for the pull request, and welcome! The contain-rs team is excited to review your changes, and you should hear from @huonw (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

@rillian

rillian commented Jul 13, 2017

Copy link
Copy Markdown

Ping on this. We're really like to publish a new sccache release, but it's blocked on being able to use these features of lru-cache. If they're acceptable, could you please merge and publish a new crate release?

@apasel422
apasel422 requested a review from Gankra July 13, 2017 21:22
@apasel422 apasel422 assigned Gankra and unassigned huonw Jul 13, 2017
@Gankra

Gankra commented Jul 26, 2017

Copy link
Copy Markdown
Contributor

sccache has forked this repo, and we don't seem to have the bandwidth to maintain this anymore. Closing.

@Gankra Gankra closed this Jul 26, 2017
@rillian

rillian commented Jul 26, 2017

Copy link
Copy Markdown

@gankro, If you don't have bandwidth to maintain the crate any more, could you add @luser and I to the crates.io page so we can go forward with our fork as the publicly available crate?

@Gankra

Gankra commented Jul 26, 2017

Copy link
Copy Markdown
Contributor

@Gankra

Gankra commented Jul 26, 2017

Copy link
Copy Markdown
Contributor

@rillian I'll strongly consider it, but I'd like to wait a few days to think about the situation and gather responses. I don't know you two super well, so I'm not immediately confident in handing over all the users of this crate to y'all.

@rillian

rillian commented Jul 26, 2017

Copy link
Copy Markdown

np. Thanks for the context!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants