Skip to content

Commit 7283916

Browse files
committed
Convert error Displays to lowercase per Rust conventions
1 parent 5f3ff6f commit 7283916

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ impl fmt::Display for Error {
498498
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
499499
use Error::*;
500500
match self {
501-
InvalidCharacter(c) => write!(f, "String contains unexpected character {c:?}"),
502-
MissingSeparator(c) => write!(f, "No occurrence of {c:?} found in string"),
503-
MultipleSeparators(c) => write!(f, "Multiple occurrences of {c:?} found in string"),
501+
InvalidCharacter(c) => write!(f, "string contains unexpected character {c:?}"),
502+
MissingSeparator(c) => write!(f, "no occurrence of {c:?} found in string"),
503+
MultipleSeparators(c) => write!(f, "multiple occurrences of {c:?} found in string"),
504504
}
505505
}
506506
}
@@ -1167,18 +1167,18 @@ mod tests {
11671167
#[test]
11681168
fn test_display_invalid_character() {
11691169
let e = Error::InvalidCharacter('ö');
1170-
assert_eq!(e.to_string(), "String contains unexpected character 'ö'");
1170+
assert_eq!(e.to_string(), "string contains unexpected character 'ö'");
11711171
}
11721172

11731173
#[test]
11741174
fn test_display_missing_separator() {
11751175
let e = Error::MissingSeparator('?');
1176-
assert_eq!(e.to_string(), "No occurrence of '?' found in string");
1176+
assert_eq!(e.to_string(), "no occurrence of '?' found in string");
11771177
}
11781178

11791179
#[test]
11801180
fn test_display_multiple_separators() {
11811181
let e = Error::MultipleSeparators('?');
1182-
assert_eq!(e.to_string(), "Multiple occurrences of '?' found in string");
1182+
assert_eq!(e.to_string(), "multiple occurrences of '?' found in string");
11831183
}
11841184
}

0 commit comments

Comments
 (0)