@@ -325,8 +325,8 @@ impl Rudof {
325325 source_name2 : Option < & str > ,
326326 ) -> Result < ShaCo > {
327327 let reader_mode: ReaderMode = reader_mode. into ( ) ;
328- let coshamo1 = self . get_coshamo ( reader1, & mode1, & format1, base1, & reader_mode, label1, source_name1) ?;
329- let coshamo2 = self . get_coshamo ( reader2, & mode2, & format2, base2, & reader_mode, label2, source_name2) ?;
328+ let coshamo1 = self . get_coshamo ( reader1, & mode1, & format1, base1, Some ( & reader_mode) , label1, source_name1) ?;
329+ let coshamo2 = self . get_coshamo ( reader2, & mode2, & format2, base2, Some ( & reader_mode) , label2, source_name2) ?;
330330 Ok ( coshamo1. compare ( & coshamo2) )
331331 }
332332
@@ -1367,10 +1367,10 @@ impl Rudof {
13671367 self . read_data (
13681368 & mut data_reader,
13691369 data_input. source_name ( ) . as_str ( ) ,
1370- & rdf_format,
1370+ Some ( & rdf_format) ,
13711371 Some ( base. as_str ( ) ) ,
1372- reader_mode,
1373- true ,
1372+ Some ( reader_mode) ,
1373+ Some ( true ) ,
13741374 ) ?;
13751375 }
13761376 Ok ( ( ) )
@@ -1422,9 +1422,9 @@ impl Rudof {
14221422 // Read the schema
14231423 self . read_shex (
14241424 schema_reader,
1425- & schema_format,
1425+ Some ( & schema_format) ,
14261426 Some ( base_iri. as_str ( ) ) ,
1427- reader_mode,
1427+ Some ( reader_mode) ,
14281428 Some ( & input. source_name ( ) ) ,
14291429 ) ?;
14301430
@@ -1642,9 +1642,9 @@ impl Rudof {
16421642 self . read_shacl (
16431643 & mut schema_reader,
16441644 & input. source_name ( ) ,
1645- schema_format,
1645+ Some ( schema_format) ,
16461646 Some ( base_iri. as_str ( ) ) ,
1647- reader_mode,
1647+ Some ( reader_mode) ,
16481648 ) ?;
16491649
16501650 Ok ( ( ) )
@@ -1950,7 +1950,7 @@ impl Rudof {
19501950 self . compile_shacl ( & ShapesGraphSource :: CurrentData ) ?;
19511951 }
19521952
1953- self . serialize_shacl ( result_format, writer) ?;
1953+ self . serialize_shacl ( Some ( result_format) , writer) ?;
19541954
19551955 if tracing:: enabled!( tracing:: Level :: DEBUG ) {
19561956 match self . get_shacl_ir ( ) {
@@ -2012,7 +2012,7 @@ impl Rudof {
20122012 context : "DCTAP" . to_string ( ) ,
20132013 error : format ! ( "{e}" ) ,
20142014 } ) ?;
2015- self . read_dctap ( reader, format) ?;
2015+ self . read_dctap ( reader, Some ( format) ) ?;
20162016 Ok ( ( ) )
20172017 } ,
20182018 // Excel formats require a file path (cannot read from stdin/URL/string)
@@ -2320,9 +2320,9 @@ mod tests {
23202320 rudof
23212321 . read_shex (
23222322 shex. as_bytes ( ) ,
2323- & ShExFormat :: ShExC ,
2323+ Some ( & ShExFormat :: ShExC ) ,
23242324 None ,
2325- & ReaderMode :: Strict ,
2325+ Some ( & ReaderMode :: Strict ) ,
23262326 None ,
23272327 )
23282328 . unwrap ( ) ;
@@ -2355,9 +2355,9 @@ mod tests {
23552355 rudof
23562356 . read_shex (
23572357 shex. as_bytes ( ) ,
2358- & ShExFormat :: ShExC ,
2358+ Some ( & ShExFormat :: ShExC ) ,
23592359 None ,
2360- & ReaderMode :: Strict ,
2360+ Some ( & ReaderMode :: Strict ) ,
23612361 None ,
23622362 )
23632363 . unwrap ( ) ;
@@ -2411,8 +2411,8 @@ mod tests {
24112411 . unwrap ( ) ;
24122412 let result = rudof
24132413 . validate_shacl (
2414- & ShaclValidationMode :: Native ,
2415- & crate :: ShapesGraphSource :: CurrentSchema ,
2414+ Some ( & ShaclValidationMode :: Native ) ,
2415+ Some ( & crate :: ShapesGraphSource :: CurrentSchema ) ,
24162416 )
24172417 . unwrap ( ) ;
24182418 assert ! ( result. results( ) . is_empty( ) )
@@ -2459,8 +2459,8 @@ mod tests {
24592459 . unwrap ( ) ;
24602460 let result = rudof
24612461 . validate_shacl (
2462- & ShaclValidationMode :: Native ,
2463- & crate :: ShapesGraphSource :: CurrentSchema ,
2462+ Some ( & ShaclValidationMode :: Native ) ,
2463+ Some ( & crate :: ShapesGraphSource :: CurrentSchema ) ,
24642464 )
24652465 . unwrap ( ) ;
24662466 assert ! ( !result. conforms( ) )
@@ -2496,8 +2496,8 @@ mod tests {
24962496 . unwrap ( ) ;
24972497 let result = rudof
24982498 . validate_shacl (
2499- & ShaclValidationMode :: Native ,
2500- & crate :: ShapesGraphSource :: CurrentData ,
2499+ Some ( & ShaclValidationMode :: Native ) ,
2500+ Some ( & crate :: ShapesGraphSource :: CurrentData ) ,
25012501 )
25022502 . unwrap ( ) ;
25032503 assert ! ( !result. conforms( ) )
@@ -2533,8 +2533,8 @@ mod tests {
25332533 . unwrap ( ) ;
25342534 let result = rudof
25352535 . validate_shacl (
2536- & ShaclValidationMode :: Native ,
2537- & crate :: ShapesGraphSource :: CurrentData ,
2536+ Some ( & ShaclValidationMode :: Native ) ,
2537+ Some ( & crate :: ShapesGraphSource :: CurrentData ) ,
25382538 )
25392539 . unwrap ( ) ;
25402540 assert ! ( result. conforms( ) )
0 commit comments