-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add DList examples #15752
Conversation
/// | ||
/// ```rust | ||
/// use std::collections::dlist::DList; | ||
/// use std::collections::Deque; |
There was a problem hiding this comment.
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;
Awesome! Could you squash these commits as well? |
Squashed. I'm unclear if you wanted me to add the imports back to the DList examples as well, or just for RingBuf. |
Could you add the imports here as well? |
…d, prepend and insert_when
Done. |
Someone rightfully complained in IRC that DList was lacking examples. Here are some.
…_let_method, r=HKalbasi feat: add replace_is_ok_with_if_let_ok assist following rust-lang/rust-analyzer#15743
Someone rightfully complained in IRC that DList was lacking examples. Here are some.