Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(error): Be consistent in puncutation #4384

Merged
merged 1 commit into from Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/error/format.rs
Expand Up @@ -149,7 +149,7 @@ fn write_dynamic_context(error: &crate::error::Error, styled: &mut StyledStr) ->
if let Some(ContextValue::String(invalid_arg)) = invalid_arg {
styled.none("Equal sign is needed when assigning values to '");
styled.warning(invalid_arg);
styled.none("'.");
styled.none("'");
true
} else {
false
Expand Down
2 changes: 1 addition & 1 deletion tests/builder/empty_values.rs
Expand Up @@ -118,7 +118,7 @@ fn no_empty_values_without_equals_but_requires_equals() {
assert_eq!(m.unwrap_err().kind(), ErrorKind::NoEquals);

static NO_EUQALS_ERROR: &str =
"error: Equal sign is needed when assigning values to '--config=<config>'.
"error: Equal sign is needed when assigning values to '--config=<config>'

Usage: config [OPTIONS]

Expand Down
3 changes: 1 addition & 2 deletions tests/builder/opts.rs
Expand Up @@ -21,8 +21,7 @@ fn require_equals_fail() {
#[test]
#[cfg(feature = "error-context")]
fn require_equals_fail_message() {
static NO_EQUALS: &str =
"error: Equal sign is needed when assigning values to '--config=<cfg>'.
static NO_EQUALS: &str = "error: Equal sign is needed when assigning values to '--config=<cfg>'

Usage: prog [OPTIONS]

Expand Down