@@ -6,7 +6,7 @@ use serde_json::{self as encoder, Value};
66use std:: collections:: HashMap ;
77use std:: path:: { Path , PathBuf } ;
88use std:: str:: FromStr ;
9- use tokio:: io:: { AsyncBufReadExt , AsyncReadExt , AsyncWriteExt , BufStream } ;
9+ use tokio:: io:: { AsyncReadExt , AsyncWriteExt , BufStream } ;
1010use tokio:: net:: { UnixListener , UnixStream } ;
1111
1212// Include the OpenRPC specification
@@ -295,7 +295,7 @@ impl Api {
295295 if let Some ( params) = & request. params {
296296 if let Some ( name) = params. get ( "name" ) . and_then ( |v| v. as_str ( ) ) {
297297 if let Some ( content) = params. get ( "content" ) . and_then ( |v| v. as_object ( ) ) {
298- Api :: create_service ( name, content, zinit ) . await
298+ Api :: create_service ( name, content) . await
299299 } else {
300300 Err ( anyhow:: anyhow!( "Missing or invalid 'content' parameter" ) )
301301 }
@@ -310,7 +310,7 @@ impl Api {
310310 "service.delete" => {
311311 if let Some ( params) = & request. params {
312312 if let Some ( name) = params. get ( "name" ) . and_then ( |v| v. as_str ( ) ) {
313- Api :: delete_service ( name, zinit ) . await
313+ Api :: delete_service ( name) . await
314314 } else {
315315 Err ( anyhow:: anyhow!( "Missing or invalid 'name' parameter" ) )
316316 }
@@ -322,7 +322,7 @@ impl Api {
322322 "service.get" => {
323323 if let Some ( params) = & request. params {
324324 if let Some ( name) = params. get ( "name" ) . and_then ( |v| v. as_str ( ) ) {
325- Api :: get_service ( name, zinit ) . await
325+ Api :: get_service ( name) . await
326326 } else {
327327 Err ( anyhow:: anyhow!( "Missing or invalid 'name' parameter" ) )
328328 }
@@ -714,7 +714,6 @@ impl Api {
714714 async fn create_service < S : AsRef < str > > (
715715 name : S ,
716716 content : & serde_json:: Map < String , Value > ,
717- zinit : ZInit ,
718717 ) -> Result < Value > {
719718 use std:: fs;
720719 use std:: io:: Write ;
@@ -749,7 +748,7 @@ impl Api {
749748 ) ) )
750749 }
751750
752- async fn delete_service < S : AsRef < str > > ( name : S , zinit : ZInit ) -> Result < Value > {
751+ async fn delete_service < S : AsRef < str > > ( name : S ) -> Result < Value > {
753752 use std:: fs;
754753
755754 let name = name. as_ref ( ) ;
@@ -776,7 +775,7 @@ impl Api {
776775 ) ) )
777776 }
778777
779- async fn get_service < S : AsRef < str > > ( name : S , zinit : ZInit ) -> Result < Value > {
778+ async fn get_service < S : AsRef < str > > ( name : S ) -> Result < Value > {
780779 use std:: fs;
781780
782781 let name = name. as_ref ( ) ;
0 commit comments