fix the details in all cases

This commit is contained in:
Tamo 2025-01-22 15:58:39 +01:00 committed by Louis Dureuil
parent e41ebd3047
commit b132d70413
No known key found for this signature in database
16 changed files with 45 additions and 19 deletions

View file

@ -269,7 +269,9 @@ impl KindWithContent {
}),
KindWithContent::DumpCreation { .. } => Some(Details::Dump { dump_uid: None }),
KindWithContent::SnapshotCreation => None,
KindWithContent::UpgradeDatabase { .. } => None,
KindWithContent::UpgradeDatabase { from } => {
Some(Details::UpgradeDatabase { from: (from.0, from.1, from.2) })
}
}
}
@ -328,7 +330,9 @@ impl KindWithContent {
}),
KindWithContent::DumpCreation { .. } => Some(Details::Dump { dump_uid: None }),
KindWithContent::SnapshotCreation => None,
KindWithContent::UpgradeDatabase { .. } => None,
KindWithContent::UpgradeDatabase { from } => {
Some(Details::UpgradeDatabase { from: *from })
}
}
}
}
@ -369,7 +373,9 @@ impl From<&KindWithContent> for Option<Details> {
}),
KindWithContent::DumpCreation { .. } => Some(Details::Dump { dump_uid: None }),
KindWithContent::SnapshotCreation => None,
KindWithContent::UpgradeDatabase { .. } => None,
KindWithContent::UpgradeDatabase { from } => {
Some(Details::UpgradeDatabase { from: *from })
}
}
}
}
@ -623,7 +629,7 @@ pub enum Details {
swaps: Vec<IndexSwap>,
},
UpgradeDatabase {
from: (usize, usize, usize),
from: (u32, u32, u32),
},
}