@@ -811,8 +811,8 @@ impl MoonBitComponent {
811811 . ok_or_else ( || anyhow:: anyhow!( "Could not find world" ) ) ?;
812812 let mut imported_interfaces = Vec :: new ( ) ;
813813 for ( _, item) in & world. imports {
814- if let wit_parser:: WorldItem :: Interface { id, .. } = item {
815- if let Some ( interface) = self . resolve . as_ref ( ) . and_then ( |r| r. interfaces . get ( * id) ) {
814+ if let wit_parser:: WorldItem :: Interface { id, .. } = item
815+ && let Some ( interface) = self . resolve . as_ref ( ) . and_then ( |r| r. interfaces . get ( * id) ) {
816816 if let Some ( interface_name) = interface. name . as_ref ( ) {
817817 let owner_package = interface. package . ok_or_else ( || {
818818 anyhow:: anyhow!(
@@ -839,7 +839,6 @@ impl MoonBitComponent {
839839 ) ) ;
840840 }
841841 }
842- }
843842 }
844843 Ok ( imported_interfaces)
845844 }
@@ -852,8 +851,8 @@ impl MoonBitComponent {
852851 . ok_or_else ( || anyhow:: anyhow!( "Could not find world" ) ) ?;
853852 let mut exported_interfaces = Vec :: new ( ) ;
854853 for ( _, item) in & world. exports {
855- if let wit_parser:: WorldItem :: Interface { id, .. } = item {
856- if let Some ( interface) = self . resolve . as_ref ( ) . and_then ( |r| r. interfaces . get ( * id) ) {
854+ if let wit_parser:: WorldItem :: Interface { id, .. } = item
855+ && let Some ( interface) = self . resolve . as_ref ( ) . and_then ( |r| r. interfaces . get ( * id) ) {
857856 if let Some ( interface_name) = interface. name . as_ref ( ) {
858857 let owner_package = interface. package . ok_or_else ( || {
859858 anyhow:: anyhow!(
@@ -880,7 +879,6 @@ impl MoonBitComponent {
880879 ) ) ;
881880 }
882881 }
883- }
884882 }
885883 Ok ( exported_interfaces)
886884 }
0 commit comments