Skip to content

immutable get() - #37

Closed
bbigras wants to merge 1 commit into
contain-rs:masterfrom
bbigras:get
Closed

bbigras wants to merge 1 commit into
contain-rs:masterfrom
bbigras:get

Conversation

@bbigras

@bbigras bbigras commented Oct 9, 2016

Copy link
Copy Markdown

No description provided.

@FlashCat

FlashCat commented Oct 9, 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 @reem (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.

@apasel422

Copy link
Copy Markdown
Contributor

Thanks for the PR! I'm not sure about the naming here, as we might want to better indicate that calling this method does /not/ affect the LRU order. In any case, could you add a note about the LRU behavior to the doc comment?

@bbigras

bbigras commented Oct 12, 2016

Copy link
Copy Markdown
Author

we might want to better indicate that calling this method does /not/ affect the LRU order.

Yes. Something like get_without_lru or maybe get_unoptimal so people wouldn't use it without reading the doc?

In any case, could you add a note about the LRU behavior to the doc comment?

Do you mean the normal LRU behavior or just in the case of the new method?

@g2p

g2p commented Jun 12, 2017 •

Copy link
Copy Markdown

You could call it peek(). Most libraries do.

In any case, I would find this feature useful.

@compressed

Copy link
Copy Markdown

Just add one anecdote: I was also looking for this get() or peek() immutable borrow function today as well. Would like to see this merged!

@bbigras

bbigras commented Jul 21, 2017

Copy link
Copy Markdown
Author

You could call it peek(). Most libraries do.

I renamed it to peek() and rebased. Sorry for the delay.

@g2p

g2p commented Jul 22, 2017

Copy link
Copy Markdown

@apasel422, what do you think?

@Gankra Gankra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with something in the docs indicating that this doesn't affect LRU-ness. e.g.

"This doesn't modify what values are considered most-recently used"

@garyyu

garyyu commented Oct 10, 2018

Copy link
Copy Markdown

Why this PR doesn't merged? In case of a lot of reading request, the immutable get method will help for performance.

BTW, Thanks for this nice crate! 👍

@bbigras

bbigras commented Nov 1, 2018

Copy link
Copy Markdown
Author

The project is in maintenance mode so I guess I should close this.

@bbigras bbigras closed this Nov 1, 2018
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.

8 participants