File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
migration/util/migrator-types/src/migrator Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use mtma_types::movement::movement_client::rest_client::Client as MovementRestCl
8
8
pub mod live;
9
9
pub use live:: LiveMigrator ;
10
10
use mtma_util:: file:: copy_dir_recursive;
11
- use std:: path:: PathBuf ;
11
+ use std:: path:: { Path , PathBuf } ;
12
12
use tracing:: warn;
13
13
14
14
/// An enum supporting different types of runners.
@@ -126,17 +126,17 @@ impl MovementMigrator {
126
126
}
127
127
128
128
/// Recursively copies the dir for the runner to the given path
129
- pub async fn copy_dir ( & self , path : PathBuf ) -> Result < ( ) , anyhow:: Error > {
129
+ pub async fn copy_dir ( & self , path : & Path ) -> Result < ( ) , anyhow:: Error > {
130
130
let dir = self . dir ( ) ;
131
- copy_dir_recursive ( & dir, & path) . context ( "failed to copy dir for MovementMigrator" ) ?;
131
+ copy_dir_recursive ( & dir, path) . context ( "failed to copy dir for MovementMigrator" ) ?;
132
132
Ok ( ( ) )
133
133
}
134
134
135
135
/// Snapshots the migrator
136
136
///
137
137
/// NOTE: this can be used to, for example, transition from a live migrator to a movement runner.
138
138
pub async fn snapshot ( & self , path : PathBuf ) -> Result < Self , anyhow:: Error > {
139
- self . copy_dir ( path. clone ( ) ) . await ?;
139
+ self . copy_dir ( & path) . await ?;
140
140
141
141
Ok ( Self :: new ( Runner :: Movement ( Movement :: try_from_dot_movement_dir ( path) ?) ) )
142
142
}
You can’t perform that action at this time.
0 commit comments