Skip to content

Commit 989ad54

Browse files
committed
docs(error): better wordings for error messages
1 parent b4594e1 commit 989ad54

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/enclosed/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ pub enum ParseError<ParseEscapeError, ParseQueryError> {
105105
UnexpectedChar(#[error(not(source))] char),
106106
#[display("Unexpected end of input")]
107107
UnexpectedEndOfInput,
108-
#[display("Fail to escape: {_0}")]
108+
#[display("Failed to escape: {_0}")]
109109
ParseEscape(ParseEscapeError),
110-
#[display("Fail to parse query: {_0}")]
110+
#[display("Failed to parse query: {_0}")]
111111
ParseQuery(ParseQueryError),
112112
}
113113

src/system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ where
6565
/// .unwrap_err();
6666
/// # assert_eq!(
6767
/// # error.to_string(),
68-
/// # "Fail to parse query: Unexpected token '}'"
68+
/// # "Failed to parse query: Unexpected token '}'"
6969
/// # );
7070
/// assert_eq!(output, "Alice is a 20 years "); // output is partially written
7171
/// # }
@@ -109,7 +109,7 @@ where
109109
/// .unwrap_err();
110110
/// # assert_eq!(
111111
/// # error.to_string(),
112-
/// # "Fail to parse query: Unexpected end of input",
112+
/// # "Failed to parse query: Unexpected end of input",
113113
/// # );
114114
/// # }
115115
/// ```

tests/simple_escape.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn reject_invalid_escapes() {
5656
.to_string(map)
5757
.unwrap_err();
5858
dbg!(&error);
59-
let expected_message = "Fail to escape: Unsupported escape code 'a'";
59+
let expected_message = "Failed to escape: Unsupported escape code 'a'";
6060
assert_eq!(error.to_string(), expected_message);
6161
assert!(matches!(
6262
error,
@@ -81,7 +81,7 @@ fn reject_unexpected_end_of_input() {
8181
.to_string(map)
8282
.unwrap_err();
8383
dbg!(&error);
84-
let expected_message = "Fail to escape: Unexpected end of input";
84+
let expected_message = "Failed to escape: Unexpected end of input";
8585
assert_eq!(error.to_string(), expected_message);
8686
assert!(matches!(
8787
error,

0 commit comments

Comments
 (0)