TempIdx -> TempIndex
[ci skip]
This commit is contained in:
parent
908104e365
commit
21d5e105c1
@ -118,16 +118,16 @@ fn database_path(path: &Path) -> PathBuf {
|
|||||||
temp_path
|
temp_path
|
||||||
}
|
}
|
||||||
|
|
||||||
enum TempIdx {
|
enum TempIndex {
|
||||||
One,
|
One,
|
||||||
Two,
|
Two,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TempIdx {
|
impl TempIndex {
|
||||||
fn swap(&mut self) {
|
fn swap(&mut self) {
|
||||||
match *self {
|
match *self {
|
||||||
TempIdx::One => *self = TempIdx::Two,
|
TempIndex::One => *self = TempIndex::Two,
|
||||||
TempIdx::Two => *self = TempIdx::One,
|
TempIndex::Two => *self = TempIndex::One,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,8 +136,8 @@ impl TempIdx {
|
|||||||
let mut buf = db_root.to_owned();
|
let mut buf = db_root.to_owned();
|
||||||
|
|
||||||
match *self {
|
match *self {
|
||||||
TempIdx::One => buf.push("temp_migration_1"),
|
TempIndex::One => buf.push("temp_migration_1"),
|
||||||
TempIdx::Two => buf.push("temp_migration_2"),
|
TempIndex::Two => buf.push("temp_migration_2"),
|
||||||
};
|
};
|
||||||
|
|
||||||
buf
|
buf
|
||||||
@ -184,7 +184,7 @@ impl Manager {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let db_root = database_path(old_path);
|
let db_root = database_path(old_path);
|
||||||
let mut temp_idx = TempIdx::One;
|
let mut temp_idx = TempIndex::One;
|
||||||
let mut temp_path = temp_idx.path(&db_root);
|
let mut temp_path = temp_idx.path(&db_root);
|
||||||
|
|
||||||
// start with the old db.
|
// start with the old db.
|
||||||
|
Loading…
Reference in New Issue
Block a user