Skip to content

Commit a787bb8

Browse files
committed
remove ParseIntError / HexFormatError prefix.
1 parent b7c86bf commit a787bb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

palette/src/rgb/rgb.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,10 @@ impl core::fmt::Display for FromHexError {
976976
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
977977
match &*self {
978978
FromHexError::ParseIntError(e) => {
979-
write!(f, "ParseIntError: {}", e)
979+
write!(f, "{}", e)
980980
}
981981
FromHexError::HexFormatError(s) => {
982-
write!(f, "HexFormatError: {}, please use format '#fff', 'fff', '#ffffff' or\
982+
write!(f, "{}, please use format '#fff', 'fff', '#ffffff' or\
983983
'ffffff'.", s)
984984
}
985985
}
@@ -1184,7 +1184,7 @@ mod test {
11841184
assert!(c.is_err());
11851185
assert_eq!(
11861186
format!("{}", c.err().unwrap()),
1187-
"ParseIntError: invalid digit found in string"
1187+
"invalid digit found in string"
11881188
);
11891189
let c = Rgb::<Srgb,u8>::from_str("#08f");
11901190
assert_eq!(c.unwrap(), Rgb::<Srgb,u8>::new(0, 136, 255));
@@ -1196,7 +1196,7 @@ mod test {
11961196
assert!(c.is_err());
11971197
assert_eq!(
11981198
format!("{}", c.err().unwrap()),
1199-
"HexFormatError: invalid hex code format, \
1199+
"invalid hex code format, \
12001200
please use format \'#fff\', \'fff\', \'#ffffff\' or\'ffffff\'."
12011201
);
12021202
let c = Rgb::<Srgb,u8>::from_str("da0bce");

0 commit comments

Comments
 (0)