@@ -177,8 +177,7 @@ impl InterfaceGenerator<'_> {
177177 return ;
178178 }
179179
180- let ( _namespace, interface_name) =
181- & CSharp :: get_class_name_from_qualified_name ( self . name ) ;
180+ let ( _namespace, interface_name) = & CSharp :: get_class_name_from_qualified_name ( self . name ) ;
182181 let interop_name = format ! ( "{}Interop" , interface_name. strip_prefix( "I" ) . unwrap( ) ) ;
183182
184183 for future in & self . futures {
@@ -238,44 +237,43 @@ impl InterfaceGenerator<'_> {
238237 csharp_interop_src : "" . to_string ( ) ,
239238 stub : "" . to_string ( ) ,
240239 } ) ;
241-
240+
242241 self . csharp_gen . needs_future_reader_support = true ;
243242 self . csharp_gen . needs_future_writer_support = true ;
244243 }
245244
246245 uwrite ! (
247- self . csharp_interop_src,
248- r#"
246+ self . csharp_interop_src,
247+ r#"
249248 [global::System.Runtime.InteropServices.DllImportAttribute("$root", EntryPoint = "[waitable-set-new]"), global::System.Runtime.InteropServices.WasmImportLinkageAttribute]
250249 internal static extern int WaitableSetNew();
251250 "#
252251 ) ;
253252
254253 uwrite ! (
255- self . csharp_interop_src,
256- r#"
254+ self . csharp_interop_src,
255+ r#"
257256 [global::System.Runtime.InteropServices.DllImportAttribute("$root", EntryPoint = "[waitable-join]"), global::System.Runtime.InteropServices.WasmImportLinkageAttribute]
258257 internal static extern void WaitableJoin(int waitable, int set);
259258 "#
260259 ) ;
261260
262261 uwrite ! (
263- self . csharp_interop_src,
264- r#"
262+ self . csharp_interop_src,
263+ r#"
265264 [global::System.Runtime.InteropServices.DllImportAttribute("$root", EntryPoint = "[waitable-set-wait]"), global::System.Runtime.InteropServices.WasmImportLinkageAttribute]
266265 internal static unsafe extern int WaitableSetWait(int waitable, int* waitableHandlePtr);
267266 "#
268267 ) ;
269268
270269 uwrite ! (
271- self . csharp_interop_src,
272- r#"
270+ self . csharp_interop_src,
271+ r#"
273272 [global::System.Runtime.InteropServices.DllImportAttribute("$root", EntryPoint = "[waitable-set-drop]"), global::System.Runtime.InteropServices.WasmImportLinkageAttribute]
274273 internal static unsafe extern void WaitableSetDrop(int waitable);
275274 "#
276275 ) ;
277276
278-
279277 // TODO: for each type:
280278 let future_type_name = "Void" ;
281279
@@ -338,7 +336,8 @@ impl InterfaceGenerator<'_> {
338336 . or_insert_with ( || InterfaceTypeAndFragments :: new ( false ) )
339337 . interface_fragments
340338 . push ( InterfaceFragment {
341- csharp_src : format ! ( r#"
339+ csharp_src : format ! (
340+ r#"
342341 public static WaitableSet WaitableSetNew()
343342 {{
344343 var waitable = {interop_name}.WaitableSetNew();
@@ -357,10 +356,12 @@ impl InterfaceGenerator<'_> {
357356 return new EventWaitable(eventCode, buffer[0], buffer[1]);
358357 }}
359358
360- "# ) . to_string ( ) ,
359+ "#
360+ )
361+ . to_string ( ) ,
361362 csharp_interop_src : "" . to_string ( ) ,
362363 stub : "" . to_string ( ) ,
363- } ) ;
364+ } ) ;
364365 }
365366
366367 pub ( crate ) fn add_world_fragment ( self ) {
@@ -787,13 +788,15 @@ impl InterfaceGenerator<'_> {
787788 // TODO: decode the parameters
788789 return {impl_name}.{camel_name}Callback();
789790 }}
790- "# ) ;
791+ "#
792+ ) ;
791793
792794 uwriteln ! (
793795 self . src,
794796 r#"
795797 public static abstract int {camel_name}Callback();
796- "# ) ;
798+ "#
799+ ) ;
797800
798801 // TODO: The task return function can take up to 16 core parameters.
799802 let task_return_param = match & sig. results [ ..] {
@@ -1246,7 +1249,7 @@ impl InterfaceGenerator<'_> {
12461249
12471250 format ! ( "{access} {modifiers} {result_type} {camel_name}({params})" )
12481251 }
1249-
1252+
12501253 pub ( crate ) fn add_future ( & mut self , func_name : & str ) {
12511254 self . futures . push ( func_name. to_string ( ) ) ;
12521255 }
0 commit comments