@@ -669,9 +669,10 @@ fn compile_file(
669669 }
670670
671671 if let SourceType :: SourceFile ( SourceFile {
672- interface : Some ( Interface { path, .. } ) ,
673- ..
674- } ) = & module. source_type {
672+ interface : Some ( Interface { path, .. } ) ,
673+ ..
674+ } ) = & module. source_type
675+ {
675676 // we need to copy the source file to the build directory.
676677 // editor tools expects the source file in lib/bs for finding the current package
677678 // and in lib/ocaml when referencing modules in other packages
@@ -690,9 +691,10 @@ fn compile_file(
690691 . expect ( "copying source file failed" ) ;
691692 }
692693 if let SourceType :: SourceFile ( SourceFile {
693- implementation : Implementation { path, .. } ,
694- ..
695- } ) = & module. source_type {
694+ implementation : Implementation { path, .. } ,
695+ ..
696+ } ) = & module. source_type
697+ {
696698 // we need to copy the source file to the build directory.
697699 // editor tools expects the source file in lib/bs for finding the current package
698700 // and in lib/ocaml when referencing modules in other packages
@@ -715,9 +717,10 @@ fn compile_file(
715717 root_package. config . get_package_specs ( ) . iter ( ) . for_each ( |spec| {
716718 if spec. in_source {
717719 if let SourceType :: SourceFile ( SourceFile {
718- implementation : Implementation { path, .. } ,
719- ..
720- } ) = & module. source_type {
720+ implementation : Implementation { path, .. } ,
721+ ..
722+ } ) = & module. source_type
723+ {
721724 let source = helpers:: get_source_file_from_rescript_file (
722725 & Path :: new ( & package. path ) . join ( path) ,
723726 & root_package. config . get_suffix ( spec) ,
@@ -728,8 +731,7 @@ fn compile_file(
728731 ) ;
729732
730733 if source. exists ( ) {
731- let _ =
732- std:: fs:: copy ( & source, & destination) . expect ( "copying source file failed" ) ;
734+ let _ = std:: fs:: copy ( & source, & destination) . expect ( "copying source file failed" ) ;
733735 }
734736 }
735737 }
0 commit comments