Skip to content

Remove sleeps from core::run tests #6156

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
brson opened this issue May 1, 2013 · 2 comments
Closed

Remove sleeps from core::run tests #6156

brson opened this issue May 1, 2013 · 2 comments

Comments

@brson
Copy link
Contributor

brson commented May 1, 2013

Unit tests should not be doing multi-second sleeps as this is bad for turnaround during development.

@Dretch
Copy link
Contributor

Dretch commented May 1, 2013

Fair enough, I will try to get around to looking at this.

@brson
Copy link
Contributor Author

brson commented Jun 27, 2013

Done.

@brson brson closed this as completed Jun 27, 2013
bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 28, 2025
Using `Vec::extend(std::iter::repeat_n(item, N))` allows to use the more
natural number of elements to add `N`, as is probably done in the
original loop, instead of computing the difference between the existing
number of elements and the wanted one.

Before MSRV 1.82, the older suggestion to use `Vec::resize()` is still
issued.

Inspired by rust-lang#6156 (which predates `repeat_n()`).

changelog: [`same_item_push`]: recommend using `Vec::extend()` to extend
a vector
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

2 participants