Skip to content

Commit 1be113a

Browse files
committed
Update comment to remark that Drop is no longer implemented.
1 parent e028496 commit 1be113a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/store/fs.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,6 @@ impl entity_manager::Params for EmParams {
221221
state: entity_manager::ActiveEntityState<Self>,
222222
cause: entity_manager::ShutdownCause,
223223
) {
224-
// this isn't strictly necessary. Drop will run anyway as soon as the
225-
// state is reset to it's default value. Doing it here means that we
226-
// have exact control over where it happens.
227224
if let Some(mut handle) = state.state.0.lock().await.take() {
228225
trace!("shutting down hash: {}, cause: {cause:?}", state.id);
229226
handle.persist(&state);

src/store/fs/bao_file.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,10 @@ impl BaoFileStorage {
502502
}
503503

504504
/// A cheaply cloneable handle to a bao file, including the hash and the configuration.
505+
///
506+
/// You must call [Self::persist] to write the bitfield to disk, if you want to persist
507+
/// the file handle, otherwise the bitfield will not be written to disk and will have
508+
/// to be reconstructed on next use.
505509
#[derive(Debug, Clone, derive_more::Deref)]
506510
pub(crate) struct BaoFileHandle(Arc<watch::Sender<BaoFileStorage>>);
507511

0 commit comments

Comments
 (0)