MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / drop

Method drop

crates/commitlog/src/stream/writer.rs:378–387  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

376 R: AsyncRepo + Send + 'static,
377{
378 fn drop(&mut self) {
379 if let Some(current_segment) = self.current_segment.take() {
380 trace!("closing current segment on writer drop");
381 tokio::spawn(
382 current_segment
383 .close()
384 .inspect_err(|e| warn!("error closing segment on drop: {e}")),
385 );
386 }
387 }
388}
389
390/// What to do when [`StreamWriter::create`] detects trailing (invalid) data

Callers

nothing calls this directly

Calls 2

closeMethod · 0.65
takeMethod · 0.45

Tested by

no test coverage detected