Skip to content

Commit ed3a355

Browse files
committed
refactor
1 parent 994600e commit ed3a355

File tree

1 file changed

+4
-6
lines changed
  • gix-actor/tests/identity

1 file changed

+4
-6
lines changed

gix-actor/tests/identity/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use bstr::ByteSlice;
22
use gix_actor::Identity;
3+
use winnow::stream::AsBStr;
34

45
#[test]
56
fn round_trip() -> gix_testtools::Result {
@@ -40,12 +41,9 @@ fn lenient_parsing() -> gix_testtools::Result {
4041
);
4142
let signature: Identity = identity.into();
4243
let mut output = Vec::new();
43-
let result = signature.write_to(&mut output);
44-
45-
// Both test cases should now work since angle brackets are allowed
46-
// and the parser strips newlines from the input
47-
assert!(result.is_ok(),
48-
"angle brackets should be allowed for round-tripping, and newlines are stripped during parsing");
44+
signature.write_to(&mut output).expect("write does not complain");
45+
46+
assert_eq!(output.as_bstr(), input, "round-tripping should keep these equivalent");
4947
}
5048
Ok(())
5149
}

0 commit comments

Comments
 (0)