Skip to content

widget: list: impl ListIter for VecDeque#1639

Merged
cmyr merged 1 commit intolinebender:masterfrom
raymanfx:master
Mar 10, 2021
Merged

widget: list: impl ListIter for VecDeque#1639
cmyr merged 1 commit intolinebender:masterfrom
raymanfx:master

Conversation

@raymanfx
Copy link
Collaborator

Signed-off-by: Christopher N. Hesse raymanfx@gmail.com

Signed-off-by: Christopher N. Hesse <raymanfx@gmail.com>
@raymanfx
Copy link
Collaborator Author

I've got to admit I'm not too fond of duplicating the code for Vec<T> here.
Then again, I'm not sure how to handle this otherwise. A macro does not help, since the functions differ (e.g. push vs push_back).

FYI I'm using a VecDeque<T> to implement a log buffer as a ring-like structure. Push at the end, pop from the front, that is.

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

This seems reasonable, I don't see an easy way around the duplication either. 🤷

@cmyr cmyr merged commit 444b48c into linebender:master Mar 10, 2021
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.

2 participants