Uh oh!
There was an error while loading. Please reload this page.
Add Cow::is_borrowed and Cow::is_owned - #65144
Conversation
rust-highfive
commented
Oct 5, 2019
r? @TimNN (rust_highfive has picked a reviewer for you, use r? to override) |
f3cace4 to
2b767e4Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hellow554
commented
Oct 7, 2019
You can run the tests locally i.e. with |
There was a problem hiding this comment.
let cow = Cow::Borrowed("moo");
There was a problem hiding this comment.
let bull: Cow<str> = Cow::Owned("...moo?".to_string());
There was a problem hiding this comment.
Why not: !self.is_borrowed()? (see is_some/is_none, is_ok/is_err)
There was a problem hiding this comment.
let cow: Cow<str> = Cow::Owned("moo".to_string());
There was a problem hiding this comment.
let bull = Cow::Borrowed("...moo?");
same as above, but if you want to use a String instead do:
let bull: Cow<str> = Cow::Borrowed("...moo?".to_string());
clarfonthey
commented
Oct 8, 2019
That would make too much sense |
rust-highfive
commented
Oct 9, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
hellow554
commented
Oct 9, 2019
@clarfon you don't like the suggestion: you need to add Line 125 in b5bd31e |
clarfonthey
commented
Oct 11, 2019
Thank you for the comment about the feature flag. I was just convinced that intra-doc links were broken again >< |
rust-highfive
commented
Oct 11, 2019
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
wirelessringo
commented
Oct 18, 2019
Ping from triage. @TimNN can you please review this PR? Thanks. |
clarfonthey
commented
Oct 22, 2019
Removed the links on |
hellow554
commented
Oct 23, 2019
@ProgrammaticNajel TimNN seems to be not available. Can you reassign it please? |
tesuji
commented
Oct 23, 2019
r? @sfackler |
sfackler
commented
Oct 23, 2019
@bors r+ |
bors
commented
Oct 23, 2019
📌 Commit eeb549b has been approved by |
Add Cow::is_borrowed and Cow::is_owned Implements rust-lang#65143.
Add Cow::is_borrowed and Cow::is_owned Implements rust-lang#65143.
Rollup of 12 pull requests Successful merges: - #64178 (More Clippy fixes for alloc, core and std) - #65144 (Add Cow::is_borrowed and Cow::is_owned) - #65193 (Lockless LintStore) - #65479 (Add the `matches!( $expr, $pat ) -> bool` macro) - #65518 (Avoid ICE when checking `Destination` of `break` inside a closure) - #65583 (rustc_metadata: use a table for super_predicates, fn_sig, impl_trait_ref.) - #65641 (Derive `Rustc{En,De}codable` for `TokenStream`.) - #65648 (Eliminate `intersect_opt`.) - #65657 (Remove `InternedString`) - #65691 (Update E0659 error code long explanation to 2018 edition) - #65696 (Fix an issue with const inference variables sticking around under Chalk + NLL) - #65704 (relax ExactSizeIterator bound on write_bytes) Failed merges: r? @ghost
Implements #65143.