File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,11 +36,11 @@ export declare function getBufferOffset(buffer: Uint8Array): number
3636
3737/** JS callback to create a workspace. */
3838export type JsCreateWorkspaceCb =
39- ( ( arg0 : string ) => Promise < undefined > )
39+ ( ( arg : string ) => Promise < undefined > )
4040
4141/** JS callback to destroy a workspace. */
4242export type JsDestroyWorkspaceCb =
43- ( ( arg0 : string ) => void )
43+ ( ( arg : string ) => void )
4444
4545/** JS callback to lint a file. */
4646export type JsLintFileCb =
Original file line number Diff line number Diff line change @@ -312,9 +312,8 @@ fn wrap_create_workspace(cb: JsCreateWorkspaceCb) -> ExternalLinterCreateWorkspa
312312 Arc :: new ( Box :: new ( move |workspace_uri| {
313313 let cb = & cb;
314314 let res = tokio:: task:: block_in_place ( || {
315- tokio:: runtime:: Handle :: current ( ) . block_on ( async move {
316- cb. call_async ( FnArgs :: from ( ( workspace_uri, ) ) ) . await ?. into_future ( ) . await
317- } )
315+ tokio:: runtime:: Handle :: current ( )
316+ . block_on ( async move { cb. call_async ( workspace_uri) . await ?. into_future ( ) . await } )
318317 } ) ;
319318
320319 match res {
@@ -328,7 +327,7 @@ fn wrap_create_workspace(cb: JsCreateWorkspaceCb) -> ExternalLinterCreateWorkspa
328327
329328/// Wrap `destroyWorkspace` JS callback as a normal Rust function.
330329fn wrap_destroy_workspace ( cb : JsDestroyWorkspaceCb ) -> ExternalLinterDestroyWorkspaceCb {
331- Arc :: new ( Box :: new ( move |workspace_uri : String | {
332- let _ = cb. call ( FnArgs :: from ( ( workspace_uri, ) ) , ThreadsafeFunctionCallMode :: Blocking ) ;
330+ Arc :: new ( Box :: new ( move |workspace_uri| {
331+ let _ = cb. call ( workspace_uri, ThreadsafeFunctionCallMode :: Blocking ) ;
333332 } ) )
334333}
Original file line number Diff line number Diff line change @@ -85,11 +85,11 @@ pub type JsSetupRuleConfigsCb = ThreadsafeFunction<
8585#[ napi]
8686pub type JsCreateWorkspaceCb = ThreadsafeFunction <
8787 // Arguments
88- FnArgs < ( String , ) > , // Workspace URI
88+ String , // Workspace URI
8989 // Return value
9090 Promise < ( ) > ,
9191 // Arguments (repeated)
92- FnArgs < ( String , ) > ,
92+ String ,
9393 // Error status
9494 Status ,
9595 // CalleeHandled
@@ -100,11 +100,11 @@ pub type JsCreateWorkspaceCb = ThreadsafeFunction<
100100#[ napi]
101101pub type JsDestroyWorkspaceCb = ThreadsafeFunction <
102102 // Arguments
103- FnArgs < ( String , ) > , // Workspace URI
103+ String , // Workspace URI
104104 // Return value
105105 ( ) ,
106106 // Arguments (repeated)
107- FnArgs < ( String , ) > ,
107+ String ,
108108 // Error status
109109 Status ,
110110 // CalleeHandled
You can’t perform that action at this time.
0 commit comments