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 examples for VecDeque #34855

Merged
merged 1 commit into from
Jul 21, 2016
Merged

Conversation

GuillaumeGomez
Copy link
Member

Part of #29348.

r? @steveklabnik

@frewsxcv
Copy link
Member

Looks great, nice work! 👍

/// vector.push_back(1);
/// vector.push_back(2);
///
/// assert_eq!(vector.as_slices(), (&[0u32, 1, 2] as &[u32], &[] as &[u32]));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is easier to read and more conventional:

assert_eq!(vector.as_slices(), (&[0, 1, 2][..], &[][..]));

Copy link
Member

Choose a reason for hiding this comment

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

Another option:

assert_eq!(vector.as_slices(), (&[0u32, 1, 2] as &[_], &[] as &[_]));

Copy link
Member Author

@GuillaumeGomez GuillaumeGomez Jul 17, 2016

Choose a reason for hiding this comment

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

I prefer to be as explicit as possible. I don't see the point to use &[_] instead of &[u32].

I think this is easier to read and more conventional:

assert_eq!(vector.as_slices(), (&[0, 1, 2][..], &[][..]));

I'm not really sure that it is simpler to read. :-/

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jul 19, 2016

📌 Commit 42326ec has been approved by steveklabnik

@bors
Copy link
Contributor

bors commented Jul 20, 2016

⌛ Testing commit 42326ec with merge 81bb526...

@bors
Copy link
Contributor

bors commented Jul 20, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Jul 19, 2016 at 9:49 PM, bors notifications@github.com wrote:

💔 Test failed - auto-win-msvc-64-opt-rustbuild
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-rustbuild/builds/1829


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#34855 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95NAtjvWvigl4MyolUDpfhqMepLKtks5qXajUgaJpZM4JOCgV
.

@bors
Copy link
Contributor

bors commented Jul 21, 2016

⌛ Testing commit 42326ec with merge ce5b2d3...

@bors
Copy link
Contributor

bors commented Jul 21, 2016

💔 Test failed - auto-linux-64-cargotest

@alexcrichton
Copy link
Member

@bors: retry

On Wed, Jul 20, 2016 at 6:11 PM, bors notifications@github.com wrote:

💔 Test failed - auto-linux-64-cargotest
https://buildbot.rust-lang.org/builders/auto-linux-64-cargotest/builds/1197


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#34855 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD95A2fU3-viTw3wGkl0evzSzqZtN7Rks5qXsc2gaJpZM4JOCgV
.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 21, 2016
bors added a commit that referenced this pull request Jul 21, 2016
Rollup of 7 pull requests

- Successful merges: #34854, #34855, #34880, #34895, #34911, #34921, #34930
- Failed merges: #33951, #34850
@bors bors merged commit 42326ec into rust-lang:master Jul 21, 2016
@GuillaumeGomez GuillaumeGomez deleted the vec_deque_doc branch July 21, 2016 17:23
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.

6 participants