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

Use arrays instead of vectors in tests #22623

Merged
merged 2 commits into from
Feb 25, 2015
Merged

Conversation

petrochenkov
Copy link
Contributor

Tests often use vec![1, 2, 3] instead of shorter and faster [1, 2, 3].
This patch removes a lot of unnecessary vec!s. Hopefully, the tests will compile and run a bit faster.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

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

@alexcrichton
Copy link
Member

@bors: r+ 2e91dc0

@Manishearth
Copy link
Member

Needs rebase.

@petrochenkov
Copy link
Contributor Author

Rebased and removed some more vec!s from newer code.

@@ -480,7 +480,7 @@ impl<T: Ord> BinaryHeap<T> {
/// heap.push(3);
///
/// let vec = heap.into_sorted_vec();
/// assert_eq!(vec, vec![1, 2, 3, 4, 5, 6, 7]);
Copy link
Member

Choose a reason for hiding this comment

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

How will this work?

Copy link
Member

Choose a reason for hiding this comment

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

Hey, it works. Never mind :)

@alexcrichton
Copy link
Member

@bors: r+ 2807a1c

@petrochenkov
Copy link
Contributor Author

It didn't pass local make check, I've fixed the broken test.

@alexcrichton
Copy link
Member

@bors: r+ c11807d

Manishearth added a commit to Manishearth/rust that referenced this pull request Feb 24, 2015
 Tests often use `vec![1, 2, 3]` instead of shorter and faster `[1, 2, 3]`.
This patch removes a lot of unnecessary `vec!`s. Hopefully, the tests will compile and run a bit faster.
@bors
Copy link
Contributor

bors commented Feb 25, 2015

⌛ Testing commit c11807d with merge 0e5d8b8...

@bors
Copy link
Contributor

bors commented Feb 25, 2015

💔 Test failed - auto-linux-64-x-android-t

@bors bors merged commit c11807d into rust-lang:master Feb 25, 2015
@petrochenkov petrochenkov deleted the optest branch May 9, 2015 11:58
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.

5 participants