Skip to content

Commit

Permalink
persistence: remove unneeded fs feature gates
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Aug 29, 2024
1 parent 3403b2b commit c0f6a6c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion src/persistence/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ impl<P: IndexProvider> Index<P> {
pub fn as_provider(&self) -> &P { &self.provider }

#[doc(hidden)]
#[cfg(feature = "fs")]
pub(super) fn as_provider_mut(&mut self) -> &mut P { &mut self.provider }

pub(super) fn index_consignment(
Expand Down
5 changes: 1 addition & 4 deletions src/persistence/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ impl StoreTransaction for MemState {
}

fn commit_transaction(&mut self) -> Result<(), Self::TransactionErr> {
#[cfg(feature = "fs")]
if self.dirty && self.autosave {
self.store()?;
}
Expand Down Expand Up @@ -1215,7 +1214,6 @@ impl StoreTransaction for MemIndex {
}

fn commit_transaction(&mut self) -> Result<(), Self::TransactionErr> {
#[cfg(feature = "fs")]
if self.dirty && self.autosave {
self.store()?;
}
Expand Down Expand Up @@ -1455,8 +1453,7 @@ impl IndexWriteProvider for MemIndex {
}
}

#[cfg(feature = "fs")]
mod fs {
mod store {
use crate::persistence::store::Stored;
use crate::persistence::{MemIndex, MemStash, MemState, StoreError, StoreProvider};

Expand Down
1 change: 0 additions & 1 deletion src/persistence/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ impl<P: StashProvider> Stash<P> {
pub fn as_provider(&self) -> &P { &self.provider }

#[doc(hidden)]
#[cfg(feature = "fs")]
pub(super) fn as_provider_mut(&mut self) -> &mut P { &mut self.provider }

pub(super) fn ifaces(&self) -> Result<impl Iterator<Item = &Iface> + '_, StashError<P>> {
Expand Down

0 comments on commit c0f6a6c

Please sign in to comment.