From 0f3c98a7999a4385fcbd891da95363fd8ab250be Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 13 Oct 2022 13:56:58 -0500 Subject: [PATCH] fix(error): Be consistent in puncutation --- src/error/format.rs | 2 +- tests/builder/empty_values.rs | 2 +- tests/builder/opts.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/error/format.rs b/src/error/format.rs index 2e0f8e9f824..d6edf31c01b 100644 --- a/src/error/format.rs +++ b/src/error/format.rs @@ -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 diff --git a/tests/builder/empty_values.rs b/tests/builder/empty_values.rs index 02aa7cf2fb4..d818c0b99ba 100644 --- a/tests/builder/empty_values.rs +++ b/tests/builder/empty_values.rs @@ -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='. + "error: Equal sign is needed when assigning values to '--config=' Usage: config [OPTIONS] diff --git a/tests/builder/opts.rs b/tests/builder/opts.rs index cccd1146cb7..f149528c9bb 100644 --- a/tests/builder/opts.rs +++ b/tests/builder/opts.rs @@ -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='. + static NO_EQUALS: &str = "error: Equal sign is needed when assigning values to '--config=' Usage: prog [OPTIONS]