Skip to content
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

impl Reader/Writer for Vec<u8> and &[u8], get rid of {Buf,Mem}{Reader,Writer} #15946

Closed
erickt opened this issue Jul 24, 2014 · 2 comments
Closed

Comments

@erickt
Copy link
Contributor

erickt commented Jul 24, 2014

If we end up removing Seek from MemWriter as suggested in #15915, there's not much reason left to having an explicit MemWriter. Instead, we could directly implement Writer on Vec<u8>. Likewise, we could do the same with BufWriter/BufReader and &[u8] if we take advantage of the fact that neither of them return the slice, so they can shrink the slice as it is read or written to.

@masklinn
Copy link
Contributor

masklinn commented Dec 7, 2014

Hasn't this been mostly fixed by #18885 (Writer for Vec) and #18980 (Reader for &[u8], Writer for &mut [u8])?

@steveklabnik
Copy link
Member

Yes, and anything left would be an RFC now.

bors added a commit to rust-lang-ci/rust that referenced this issue Dec 4, 2023
internal: simplify the removal of dulicate workspaces.

### Summary:
Refactoring the duplicate removal process for `workspaces` in `fetch_workspaces`.

### Changes Made:

Replaced `[].iter().enumerate().skip(...).filter_map(...)` with a more concise `[i+1..].positions(...)` provided by `itertools`, which enhances clarity without changing functionality

### Impact:

This change aims to enhance the duplicate removal process for `workspaces`. This change has been tested on my machine.

Please review and provide feedback. Thanks!
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