Skip to content

Document Vec #15894

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

Merged
merged 4 commits into from
Jul 22, 2014
Merged

Document Vec #15894

merged 4 commits into from
Jul 22, 2014

Conversation

treeman
Copy link
Contributor

@treeman treeman commented Jul 22, 2014

Fill in examples for missing methods. Opt for vec![] instead of vec!().

/// let v = vec![1i, 2, 3];
/// let p = v.as_ptr();
/// unsafe {
/// let b = raw::from_buf(p, 3u);
Copy link
Member

Choose a reason for hiding this comment

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

Could this change to something like:

unsafe {
    // examine each element manually
    assert_eq!(*p, 1i);
    assert_eq!(*p.offset(1), 2i);
    assert_eq!(*p.offset(2), 3i);
}

treeman added 2 commits July 22, 2014 14:06
Also more explicit raw pointer handling in unsafe examples.
Remove unnecessary `use std::vec::Vec`. Use ``` code blocks
with rust as default instead of spelling it out.
bors added a commit that referenced this pull request Jul 22, 2014
Fill in examples for missing methods. Opt for `vec![]` instead of `vec!()`.
@bors bors closed this Jul 22, 2014
@bors bors merged commit 8d54ec8 into rust-lang:master Jul 22, 2014
@treeman treeman deleted the vec-doc branch September 17, 2014 13:13
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 27, 2023
…ion, r=Veykril

Cancelable Initialization

This commit provides additional initialization methods to Connection in order to support CTRL + C sigterm handling.

In the process of adding LSP to Nushell (see nushell/nushell#10941) this gap has been identified.
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.

3 participants