@@ -4,7 +4,7 @@ use smallvec::SmallVec;
44
55use crate :: {
66 commit:: { LONG_MESSAGE , MERGE_TAG , SIGNATURE } ,
7- fixture_name, hex_to_id, linus_signature, signature ,
7+ fixture_name, hex_to_id, linus_signature,
88} ;
99
1010#[ test]
@@ -26,7 +26,7 @@ fn invalid_timestsamp() {
2626}
2727
2828#[ test]
29- fn invalid_email_of_committer ( ) {
29+ fn invalid_email_of_committer ( ) -> crate :: Result {
3030 let actor = gix_actor:: SignatureRef {
3131 name : b"Gregor Hartmann" . as_bstr ( ) ,
3232 email : b"gh <Gregor Hartmann<gh@openoffice.org" . as_bstr ( ) ,
@@ -46,8 +46,9 @@ fn invalid_email_of_committer() {
4646 extra_headers: vec![ ]
4747 }
4848 ) ;
49- assert_eq ! ( commit. author( ) . unwrap( ) , actor) ;
50- assert_eq ! ( commit. committer( ) . unwrap( ) , actor) ;
49+ assert_eq ! ( commit. author( ) ?, actor) ;
50+ assert_eq ! ( commit. committer( ) ?, actor) ;
51+ Ok ( ( ) )
5152}
5253
5354#[ test]
@@ -123,8 +124,8 @@ fn mergetag() -> crate::Result {
123124 assert_eq ! ( commit, expected) ;
124125 assert_eq ! ( commit. extra_headers( ) . find_all( "mergetag" ) . count( ) , 1 ) ;
125126 assert_eq ! ( commit. extra_headers( ) . mergetags( ) . count( ) , 1 ) ;
126- assert_eq ! ( commit. author( ) . unwrap ( ) , linus_signature( "1591996221 -0700" ) ) ;
127- assert_eq ! ( commit. committer( ) . unwrap ( ) , linus_signature( "1591996221 -0700" ) ) ;
127+ assert_eq ! ( commit. author( ) ? , linus_signature( "1591996221 -0700" ) ) ;
128+ assert_eq ! ( commit. committer( ) ? , linus_signature( "1591996221 -0700" ) ) ;
128129 Ok ( ( ) )
129130}
130131
@@ -244,8 +245,8 @@ Signed-off-by: Kim Altintop <kim@eagain.st>"
244245 extra_headers: vec![ ( b"gpgsig" . as_bstr( ) , b"-----BEGIN PGP SIGNATURE-----\n \n iHUEABYIAB0WIQSuZwcGWSQItmusNgR5URpSUCnwXQUCYT7xpAAKCRB5URpSUCnw\n XWB3AP9q323HlxnI8MyqszNOeYDwa7Y3yEZaUM2y/IRjz+z4YQEAq0yr1Syt3mrK\n OSFCqL2vDm3uStP+vF31f6FnzayhNg0=\n =Mhpp\n -----END PGP SIGNATURE-----\n " . as_bstr( ) . into( ) ) ]
245246 }
246247 ) ;
247- assert_eq ! ( commit. author( ) . unwrap ( ) , kim) ;
248- assert_eq ! ( commit. committer( ) . unwrap ( ) , kim) ;
248+ assert_eq ! ( commit. author( ) ? , kim) ;
249+ assert_eq ! ( commit. committer( ) ? , kim) ;
249250 let message = commit. message ( ) ;
250251 assert_eq ! ( message. title, "test: use gitoxide for link-git-protocol tests" ) ;
251252 assert_eq ! (
@@ -359,12 +360,3 @@ fn bogus_multi_gpgsig_header() -> crate::Result {
359360 ) ;
360361 Ok ( ( ) )
361362}
362-
363- #[ test]
364- fn author_method_returns_trimmed_signature ( ) -> crate :: Result {
365- let backing = fixture_name ( "commit" , "unsigned.txt" ) ;
366- let commit = CommitRef :: from_bytes ( & backing) ?;
367- assert_eq ! ( commit. author( ) . unwrap( ) , signature( "1592437401 +0800" ) ) ;
368- assert_eq ! ( commit. committer( ) . unwrap( ) , signature( "1592437401 +0800" ) ) ;
369- Ok ( ( ) )
370- }
0 commit comments