Skip to content

Commit cb6ec63

Browse files
committed
Adjust non-UTF-8 error message.
This commit came after the "Release 1.0.2" commit but I will include it in 1.0.2 by cutting the release from this commit.
1 parent 3d4c34f commit cb6ec63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ where
146146
for reader in readers {
147147
for line in reader.lines() {
148148
let Ok(line) = line else {
149-
eprintln!("error: non-UTF-8 input detected");
149+
eprintln!("counts: non-UTF-8 input detected, aborting");
150150
std::process::exit(1);
151151
};
152152
let (line, weight) = get_line_and_weight(line);

tests/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ baz 23 - +1
228228
#[test]
229229
fn non_utf8() -> Result<(), Box<dyn std::error::Error>> {
230230
let input = unsafe { std::str::from_utf8_unchecked(&[0x97, 0x98, 0x99, 0xff]) };
231-
let expected_output = "error: non-UTF-8 input detected\n";
231+
let expected_output = "counts: non-UTF-8 input detected, aborting\n";
232232

233233
bad_test(input, expected_output)
234234
}

0 commit comments

Comments
 (0)