@@ -198,13 +198,13 @@ trait ChainstateRpc {
198198 #[ method( name = "export_bootstrap_file" ) ]
199199 async fn export_bootstrap_file (
200200 & self ,
201- file_path : & std:: path:: Path ,
201+ file_path : std:: path:: PathBuf ,
202202 include_stale_blocks : bool ,
203203 ) -> RpcResult < ( ) > ;
204204
205205 /// Imports a bootstrap file's blocks to this node
206206 #[ method( name = "import_bootstrap_file" ) ]
207- async fn import_bootstrap_file ( & self , file_path : & std:: path:: Path ) -> RpcResult < ( ) > ;
207+ async fn import_bootstrap_file ( & self , file_path : std:: path:: PathBuf ) -> RpcResult < ( ) > ;
208208
209209 /// Return generic information about the chain, including the current best block, best block height and more.
210210 #[ method( name = "info" ) ]
@@ -516,18 +516,16 @@ impl ChainstateRpcServer for super::ChainstateHandle {
516516
517517 async fn export_bootstrap_file (
518518 & self ,
519- file_path : & std:: path:: Path ,
519+ file_path : std:: path:: PathBuf ,
520520 include_stale_blocks : bool ,
521521 ) -> RpcResult < ( ) > {
522- let file_path = file_path. to_owned ( ) ;
523522 rpc:: handle_result (
524523 self . call ( move |this| export_bootstrap_file ( this, & file_path, include_stale_blocks) )
525524 . await ,
526525 )
527526 }
528527
529- async fn import_bootstrap_file ( & self , file_path : & std:: path:: Path ) -> RpcResult < ( ) > {
530- let file_path = file_path. to_owned ( ) ;
528+ async fn import_bootstrap_file ( & self , file_path : std:: path:: PathBuf ) -> RpcResult < ( ) > {
531529 rpc:: handle_result ( self . call_mut ( move |this| import_bootstrap_file ( this, & file_path) ) . await )
532530 }
533531
0 commit comments