diff options
| author | bors <bors@rust-lang.org> | 2015-06-08 20:52:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-08 20:52:33 +0000 |
| commit | 02c33b690b9270ef7d26412fdf4a8498acfea1a7 (patch) | |
| tree | 6b24edc9c3eb5bca1e5c509cc7db61eba178ae48 /src/libstd/sys | |
| parent | dc72834e2b482e904352fb3442e0450ee0d53190 (diff) | |
| parent | c160192f5f26279eb065a163e651ce610247b108 (diff) | |
| download | rust-02c33b690b9270ef7d26412fdf4a8498acfea1a7.tar.gz rust-02c33b690b9270ef7d26412fdf4a8498acfea1a7.zip | |
Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichton
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical. Let’s deprecate now and plan to remove in the next cycle. (It’s `#[unstable]`.) r? @alexcrichton CC @nagisa
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/wtf8.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs index cb9239ed7ba..b2dc01e3ccb 100644 --- a/src/libstd/sys/common/wtf8.rs +++ b/src/libstd/sys/common/wtf8.rs @@ -906,8 +906,8 @@ mod tests { #[test] fn wtf8buf_from_string() { - assert_eq!(Wtf8Buf::from_string(String::from_str("")).bytes, b""); - assert_eq!(Wtf8Buf::from_string(String::from_str("aé 💩")).bytes, + assert_eq!(Wtf8Buf::from_string(String::from("")).bytes, b""); + assert_eq!(Wtf8Buf::from_string(String::from("aé 💩")).bytes, b"a\xC3\xA9 \xF0\x9F\x92\xA9"); } @@ -1049,7 +1049,7 @@ mod tests { #[test] fn wtf8buf_into_string() { let mut string = Wtf8Buf::from_str("aé 💩"); - assert_eq!(string.clone().into_string(), Ok(String::from_str("aé 💩"))); + assert_eq!(string.clone().into_string(), Ok(String::from("aé 💩"))); string.push(CodePoint::from_u32(0xD800).unwrap()); assert_eq!(string.clone().into_string(), Err(string)); } @@ -1057,9 +1057,9 @@ mod tests { #[test] fn wtf8buf_into_string_lossy() { let mut string = Wtf8Buf::from_str("aé 💩"); - assert_eq!(string.clone().into_string_lossy(), String::from_str("aé 💩")); + assert_eq!(string.clone().into_string_lossy(), String::from("aé 💩")); string.push(CodePoint::from_u32(0xD800).unwrap()); - assert_eq!(string.clone().into_string_lossy(), String::from_str("aé 💩�")); + assert_eq!(string.clone().into_string_lossy(), String::from("aé 💩�")); } #[test] @@ -1226,7 +1226,7 @@ mod tests { assert_eq!(Wtf8::from_str("aé 💩").to_string_lossy(), Cow::Borrowed("aé 💩")); let mut string = Wtf8Buf::from_str("aé 💩"); string.push(CodePoint::from_u32(0xD800).unwrap()); - let expected: Cow<str> = Cow::Owned(String::from_str("aé 💩�")); + let expected: Cow<str> = Cow::Owned(String::from("aé 💩�")); assert_eq!(string.to_string_lossy(), expected); } |
