Skip to content

Implement a few methods for RingBuf - #20197

Merged
bors merged 1 commit into
rust-lang:masterfrom
pczarn:ring_buf-collections-reform
Jan 6, 2015
Merged

bors merged 1 commit into
rust-lang:masterfrom
pczarn:ring_buf-collections-reform

Conversation

@pczarn

@pczarn pczarn commented Dec 24, 2014

Copy link
Copy Markdown
Contributor

Part of collections reform part 1 and 2, #18424 and #19986

  • shrink_to_fit
  • swap_back_remove
  • swap_front_remove
  • truncate
  • resize

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@pczarn

pczarn commented Dec 24, 2014

Copy link
Copy Markdown
Contributor Author

r? @gankro
@csherratt

@rust-highfive rust-highfive assigned Gankra and unassigned huonw Dec 24, 2014
@pczarn
pczarn force-pushed the ring_buf-collections-reform branch from 0646db8 to 13be65b Compare December 24, 2014 11:12
Comment thread src/libcollections/ring_buf.rs Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This function does not seem to return anything judging by its type notation.

@pczarn
pczarn force-pushed the ring_buf-collections-reform branch from 13be65b to 8c3436e Compare December 24, 2014 19:46
Comment thread src/libcollections/ring_buf.rs Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This example needs to be updated.

@Gankra

Gankra commented Dec 30, 2014

Copy link
Copy Markdown
Contributor

Done review.

@pczarn
pczarn force-pushed the ring_buf-collections-reform branch from c6c6946 to e0c06b7 Compare December 31, 2014 12:55
@Gankra

Gankra commented Jan 2, 2015

Copy link
Copy Markdown
Contributor

@pczarn I see you've added some commits; is that everything or are you still working on it (basically: should I re-review now?)

@pczarn

pczarn commented Jan 2, 2015

Copy link
Copy Markdown
Contributor Author

@gankro that's everything, except for swap_.._remove tests; hope to add them now.

Comment thread src/libcollections/ring_buf.rs Outdated

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.

I think the as *const T should just coerce for free? Still trying to grok when these coercions do or don't kick in, though.

@Gankra

Gankra commented Jan 2, 2015

Copy link
Copy Markdown
Contributor

Okay lgtm modulo nits/tests.

@pczarn
pczarn force-pushed the ring_buf-collections-reform branch 3 times, most recently from 603fadd to f47dd53 Compare January 3, 2015 00:29
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.

6 participants