summaryrefslogtreecommitdiffstats
path: root/vendor/gix-odb/src/store_impls/dynamic/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-odb/src/store_impls/dynamic/mod.rs')
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/mod.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/vendor/gix-odb/src/store_impls/dynamic/mod.rs b/vendor/gix-odb/src/store_impls/dynamic/mod.rs
index 5cf2a26ee..774bb61dc 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/mod.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/mod.rs
@@ -28,23 +28,18 @@ where
}
/// Decide what happens when all indices are loaded.
-#[derive(Clone, Copy)]
+#[derive(Default, Clone, Copy)]
pub enum RefreshMode {
/// Check for new or changed pack indices (and pack data files) when the last known index is loaded.
/// During runtime we will keep pack indices stable by never reusing them, however, there is the option for
/// clearing internal caches which is likely to change pack ids and it will trigger unloading of packs as they are missing on disk.
+ #[default]
AfterAllIndicesLoaded,
/// Use this if you expect a lot of missing objects that shouldn't trigger refreshes even after all packs are loaded.
/// This comes at the risk of not learning that the packs have changed in the mean time.
Never,
}
-impl Default for RefreshMode {
- fn default() -> Self {
- RefreshMode::AfterAllIndicesLoaded
- }
-}
-
impl RefreshMode {
/// Set this refresh mode to never refresh.
pub fn never(&mut self) {
@@ -94,7 +89,7 @@ pub mod structure {
/// A record of a structural element of an object database.
#[derive(Debug, Clone, PartialEq, Eq)]
- #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+ #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub enum Record {
/// A loose object database.
LooseObjectDatabase {
@@ -123,7 +118,7 @@ pub mod structure {
}
#[derive(Debug, Clone, PartialEq, Eq)]
- #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
+ #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
/// Possible stats of pack indices.
pub enum IndexState {
/// The index is active in memory because a mapping exists.