@@ -7,7 +7,6 @@ use crate::{network, vm};
77use hyper_util:: rt:: TokioIo ;
88use isolated_container_service:: isolated_container_service_server:: IsolatedContainerService ;
99use log:: info;
10- use std:: io:: Write ;
1110use std:: sync:: Arc ;
1211use std:: { collections:: HashMap , sync:: Mutex } ;
1312use std:: { fmt:: Debug , io, path:: PathBuf , time} ;
@@ -72,7 +71,7 @@ fn handle_error(e: vm::Error) -> tonic::Status {
7271async fn get_channel ( path : String ) -> Result < Channel , Error > {
7372 async fn get_channel ( path : String ) -> Result < Channel , Error > {
7473 let channel = Endpoint :: try_from ( "http://[::]:50051" )
75- . map_err ( |e | Error :: Failed ) ?
74+ . map_err ( |_ | Error :: Failed ) ?
7675 . connect_with_connector ( service_fn ( move |_: Uri | {
7776 let path = path. clone ( ) ;
7877 async move {
@@ -108,7 +107,7 @@ async fn get_channel(path: String) -> Result<Channel, Error> {
108107 }
109108 } ) )
110109 . await
111- . map_err ( |e | Error :: Failed ) ?;
110+ . map_err ( |_ | Error :: Failed ) ?;
112111 Ok ( channel)
113112 }
114113
@@ -223,7 +222,7 @@ impl IsolatedContainerService for IsolatedContainerAPI {
223222 let request = tonic:: Request :: new ( RunContainerRequest {
224223 uuid : container_id. to_string ( ) ,
225224 } ) ;
226- let response = client. run_container ( request) . await ?;
225+ client. run_container ( request) . await ?;
227226
228227 Ok ( Response :: new (
229228 isolated_container_service:: RunContainerResponse { } ,
@@ -261,8 +260,6 @@ impl IsolatedContainerService for IsolatedContainerAPI {
261260 ) -> Result < Response < isolated_container_service:: StateContainerResponse > , Status > {
262261 info ! ( "Got state_container request" ) ;
263262
264- let container_id: String = request. get_ref ( ) . uuid . clone ( ) ;
265-
266263 let vm_id: String = request. get_ref ( ) . uuid . clone ( ) ;
267264 let vm_id = Uuid :: parse_str ( & vm_id)
268265 . map_err ( |_| Status :: invalid_argument ( "failed to parse uuid" ) ) ?;
0 commit comments