summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-02-09 18:23:28 +0100
committerGitHub <noreply@github.com>2020-02-09 18:23:28 +0100
commit0b50319af69d52ce9806e91fba777986dec4e417 (patch)
treef104fd5e6a23902c377df9fbaaaf15999b3249eb /src/liballoc/string.rs
parent6dff769e3718c56f78a317df7167426d60895d58 (diff)
parent847d5b4d1387a30f1798a5c3c59c3e0c31e00319 (diff)
downloadrust-0b50319af69d52ce9806e91fba777986dec4e417.tar.gz
rust-0b50319af69d52ce9806e91fba777986dec4e417.zip
Rollup merge of #68738 - kennytm:derive-clone-eq-for-fromutf8error, r=sfackler
Derive Clone + Eq for std::string::FromUtf8Error

Implement `Clone` and `Eq` for `std::string::FromUtf8Error`.

Both the inner `Vec<u8>` and `std::str::Utf8Error` are also `Clone + Eq`, so I don't see why we shouldn't derive them on `FromUtf8Error` as well.

(impl are insta-stable, requiring FCP from T-libs.)
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 96f871d8897..8c9c95eec60 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -319,7 +319,7 @@ pub struct String {
 /// assert_eq!(vec![0, 159], value.unwrap_err().into_bytes());
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
-#[derive(Debug)]
+#[derive(Debug, Clone, PartialEq, Eq)]
 pub struct FromUtf8Error {
     bytes: Vec<u8>,
     error: Utf8Error,