File tree Expand file tree Collapse file tree
thoth-api/src/model/publication Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,8 +372,10 @@ mod validation {
372372
373373 #[ test]
374374 fn normalise_isbn_accepts_valid_hyphenless_isbn13 ( ) {
375- let mut publication: Publication = Default :: default ( ) ;
376- publication. isbn = Some ( raw_isbn ( "9783943253962" ) ) ;
375+ let mut publication = Publication {
376+ isbn : Some ( raw_isbn ( "9783943253962" ) ) ,
377+ ..Default :: default ( )
378+ } ;
377379
378380 publication. normalise_isbn ( ) . expect ( "ISBN should normalise" ) ;
379381
@@ -385,8 +387,10 @@ mod validation {
385387
386388 #[ test]
387389 fn normalise_isbn_rejects_invalid_isbn ( ) {
388- let mut publication: Publication = Default :: default ( ) ;
389- publication. isbn = Some ( raw_isbn ( "not-an-isbn" ) ) ;
390+ let mut publication = Publication {
391+ isbn : Some ( raw_isbn ( "not-an-isbn" ) ) ,
392+ ..Default :: default ( )
393+ } ;
390394
391395 let result = publication. normalise_isbn ( ) ;
392396 assert ! ( matches!( result, Err ( ThothError :: IsbnParseError ( _) ) ) ) ;
You can’t perform that action at this time.
0 commit comments