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 DList examples #15752

Merged
merged 1 commit into from
Jul 19, 2014
Merged

Add DList examples #15752

merged 1 commit into from
Jul 19, 2014

Conversation

nham
Copy link
Contributor

@nham nham commented Jul 17, 2014

Someone rightfully complained in IRC that DList was lacking examples. Here are some.

///
/// ```rust
/// use std::collections::dlist::DList;
/// use std::collections::Deque;
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 we can assume from context that this is already in scope. I don't see the benefit in repeating it in every example.

Of course, the examples still need to compile, but you can suppress it from showing up in the rendered results by prefixing the line with #, as in

/// ```rust
/// # use std::collections::dlist::DList;
/// # use std::collections::Deque;

@alexcrichton
Copy link
Member

Awesome! Could you squash these commits as well?

@nham
Copy link
Contributor Author

nham commented Jul 18, 2014

Squashed. I'm unclear if you wanted me to add the imports back to the DList examples as well, or just for RingBuf.

@alexcrichton
Copy link
Member

Could you add the imports here as well?

@nham
Copy link
Contributor Author

nham commented Jul 18, 2014

Done.

bors added a commit that referenced this pull request Jul 19, 2014
Someone rightfully complained in IRC that DList was lacking examples. Here are some.
@bors bors closed this Jul 19, 2014
@bors bors merged commit 7ee45aa into rust-lang:master Jul 19, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 13, 2023
…_let_method, r=HKalbasi

feat: add replace_is_ok_with_if_let_ok assist

following rust-lang/rust-analyzer#15743
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.

4 participants