Uh oh!
There was an error while loading. Please reload this page.
Add some examples to std::string - #30770
Conversation
rust-highfive
commented
Jan 7, 2016
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
ollie27
commented
Jan 7, 2016
I think in order to actually fix #30345 there should be a mention of the word "concatenation", perhaps in the description and examples for |
There was a problem hiding this comment.
Should probably be:
assert_eq!(bytes,[240,159,146,150]);steveklabnik
commented
Jan 7, 2016
Good call on putting the word 'concatenation' |
There was a problem hiding this comment.
and the arguments still need to be swapped because PartialEq<Vec<u8>> is not implemented for [u8; 4]
There was a problem hiding this comment.
ugh, how did this pass for me locally, then?
There was a problem hiding this comment.
What's your test setup / make command?
On Jan 8, 2016 11:02, "Steve Klabnik" notifications@github.com wrote:
In src/libcollections/string.rs
#30770 (comment):+//!
+//! +//! If you have a vector of valid UTF-8 bytes, you can make aStringout of +//! it. You can do the reverse too. +//! +//!rust
+//! let sparkle_heart = vec![240, 159, 146, 150];
+//!
+//! // We know these bytes are valid, so we'll useunwrap().
+//! let sparkle_heart = String::from_utf8(sparkle_heart).unwrap();
+//!
+//! assert_eq!("💖", sparkle_heart);
+//!
+//! let bytes = sparkle_heart.into_bytes();
+//!
+//! assert_eq([240, 159, 146, 150], bytes);ugh, how did this pass for me locally, then?
—
Reply to this email directly or view it on GitHub
https://github.com/rust-lang/rust/pull/30770/files#r49203568.
brson
commented
Jan 12, 2016
@bors r+ |
bors
commented
Jan 12, 2016
📌 Commit 51b11ca has been approved by |
bors
commented
Jan 12, 2016
⌛ Testing commit 51b11ca with merge 18f97a7... |
bors
commented
Jan 12, 2016
💔 Test failed - auto-mac-64-nopt-t |
steveklabnik
commented
Jan 12, 2016
@bors: r=brson rollup :( |
bors
commented
Jan 12, 2016
📌 Commit b6cc099 has been approved by |
Fixesrust-lang#30345 I'm not sure if there's anything else that belongs here. Thoughts?
Fixes#30345
I'm not sure if there's anything else that belongs here. Thoughts?