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

add insert_after / insert_before to MultiProgress #331

Merged
merged 7 commits into from Dec 15, 2021

Conversation

chris-laplante
Copy link
Collaborator

Also introduce internal InsertLocation enum to clarify MultiProgress:push

Introduce internal InsertLocation enum to clarify MultiProgress:push
@chris-laplante
Copy link
Collaborator Author

chris-laplante commented Dec 14, 2021

Here's a rough cut of what I propose :)

I'm thinking it may actually be better for insert_after/before to take &ProgressBar. Otherwise if you miss a clone() you risk dropping the progress bar you are trying to insert relative to.

Copy link
Collaborator

@djc djc left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good! Some comments below.

src/progress_bar.rs Outdated Show resolved Hide resolved
src/progress_bar.rs Outdated Show resolved Hide resolved
examples/multi-insert-relative.rs Outdated Show resolved Hide resolved
@djc djc mentioned this pull request Dec 15, 2021
@djc djc merged commit 9973b45 into console-rs:main Dec 15, 2021
@djc
Copy link
Collaborator

djc commented Dec 15, 2021

Thanks!

@chris-laplante
Copy link
Collaborator Author

Thank you too :)

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.

None yet

2 participants