]> git.lizzy.rs Git - rust.git/commitdiff
derive PartialEq and Eq for `ParseCharError`
authortinaun <tinagma@gmail.com>
Fri, 26 Jan 2018 23:52:27 +0000 (18:52 -0500)
committerGitHub <noreply@github.com>
Fri, 26 Jan 2018 23:52:27 +0000 (18:52 -0500)
unlike the other Parse*Error types, ParseCharError didn't have these implemented for whatever reason

src/libcore/char.rs

index e8b81db07067c65751c41f3f7fc8b9a2e731ef2b..7215bd2a4768460912c424196516df62b97801b1 100644 (file)
@@ -211,7 +211,7 @@ fn from(i: u8) -> Self {
 
 /// An error which can be returned when parsing a char.
 #[stable(feature = "char_from_str", since = "1.20.0")]
-#[derive(Clone, Debug)]
+#[derive(Clone, Debug, PartialEq, Eq)]
 pub struct ParseCharError {
     kind: CharErrorKind,
 }