Skip to content

Commit a743c5d

Browse files
committed
further clarify the expectation after changing is_err() assertion to is_ok()
1 parent 0f9af3f commit a743c5d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gix-config/src/parse/nom/tests.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,10 @@ mod key_value_pair {
808808
fn nonascii_is_allowed_for_values_but_not_for_keys() {
809809
let mut node = ParseNode::SectionHeader;
810810
let mut vec = Default::default();
811-
// Verifying `is_ok` because bad keys get ignored
812-
assert!(key_value("你好".as_bytes(), &mut node, &mut vec).is_ok());
811+
assert!(
812+
key_value("你好".as_bytes(), &mut node, &mut vec).is_ok(),
813+
"Verifying `is_ok` because bad keys get ignored, the caller parser handles this as error"
814+
);
813815
assert_eq!(vec, into_events(vec![]));
814816

815817
let mut node = ParseNode::SectionHeader;

0 commit comments

Comments
 (0)