-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Added the Option::unzip()
method
#87636
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @scottmcm (or someone else) soon. Please see the contribution instructions for more information. |
Option::unzip()
method
This comment has been minimized.
This comment has been minimized.
CI is failing, so I've marked this as waiting-on-author. You can use rustbot to mark it for review again once things are fixed. |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
Can you open a tracking issue? Thanks! |
Opened #87800 |
I don't think |
@Kixiron Could you remove 73762bf from this commit, please? I'm happy to take the unzip method, but as @jhpratt mentions, the unrelated inlines are a different thing, so shouldn't be part of this commit. Do feel free to send them as another PR if you'd like, though. (Since generic methods are inline-eligible without the attribute, though, historically core hasn't used them, though, so I'm not sure that libs-impl wants them added.) And for future reference on the tests, the doctests are run as part of CI, so simple methods don't always need |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
📌 Commit ab2c590 has been approved by |
⌛ Testing commit ab2c590 with merge d50a3379ae23f3730df6b1a25c00d5cfa7b69819... |
💔 Test failed - checks-actions |
@Kixiron: 🔑 Insufficient privileges: not in try users |
@bors retry |
Added the `Option::unzip()` method * Adds the `Option::unzip()` method to turn an `Option<(T, U)>` into `(Option<T>, Option<U>)` under the `unzip_option` feature * Adds tests for both `Option::unzip()` and `Option::zip()`, I noticed that `.zip()` didn't have any * Adds `#[inline]` to a few of `Option`'s methods that were missing it
Added the `Option::unzip()` method * Adds the `Option::unzip()` method to turn an `Option<(T, U)>` into `(Option<T>, Option<U>)` under the `unzip_option` feature * Adds tests for both `Option::unzip()` and `Option::zip()`, I noticed that `.zip()` didn't have any * Adds `#[inline]` to a few of `Option`'s methods that were missing it
Rollup of 14 pull requests Successful merges: - rust-lang#86840 (Constify implementations of `(Try)From` for int types) - rust-lang#87582 (Implement `Printer` for `&mut SymbolPrinter`) - rust-lang#87636 (Added the `Option::unzip()` method) - rust-lang#87700 (Expand explanation of E0530) - rust-lang#87811 (Do not ICE on HIR based WF check when involving lifetimes) - rust-lang#87848 (removed references to parent/child from std::thread documentation) - rust-lang#87854 (correctly handle enum variants in `opt_const_param_of`) - rust-lang#87861 (Fix heading colours in Ayu theme) - rust-lang#87865 (Clarify terms in rustdoc book) - rust-lang#87876 (add `windows` count test) - rust-lang#87880 (Remove duplicate trait bounds in `rustc_data_structures::graph`) - rust-lang#87881 (Proper table row formatting in platform support) - rust-lang#87889 (Use smaller spans when suggesting method call disambiguation) - rust-lang#87895 (typeck: don't suggest inaccessible fields in struct literals and suggest ignoring inaccessible fields in struct patterns) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Option::unzip()
method to turn anOption<(T, U)>
into(Option<T>, Option<U>)
under theunzip_option
featureOption::unzip()
andOption::zip()
, I noticed that.zip()
didn't have any#[inline]
to a few ofOption
's methods that were missing it