Skip to content

vec::find should return a reference #3793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
erickt opened this issue Oct 17, 2012 · 3 comments
Closed

vec::find should return a reference #3793

erickt opened this issue Oct 17, 2012 · 3 comments

Comments

@erickt
Copy link
Contributor

erickt commented Oct 17, 2012

Either that or we add a vec::find_ref function. Right now it returns a copy, so it trips up the no-implicit-copies warning.

@catamorphism
Copy link
Contributor

Not critical for 0.6, de-milestoning

@thestinger
Copy link
Contributor

I don't think vectors should expose this method at all, it should just be an iter module function for any iterator. The vector can't do anything special to make it faster.

@thestinger
Copy link
Contributor

Closing, since iterators make methods like this obsolete.

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 10, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 18, 2024
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

No branches or pull requests

3 participants