MCPcopy Create free account
hub / github.com/Recordscript/recordscript / drop

Method drop

libs/scrap/src/common/record.rs:306–314  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

304
305impl Drop for WebmRecorder {
306 fn drop(&mut self) {
307 let _ = std::mem::replace(&mut self.webm, None).map_or(false, |webm| webm.finalize(None));
308 let mut state = RecordState::WriteTail;
309 if !self.written || self.start.elapsed().as_secs() < MIN_SECS {
310 std::fs::remove_file(&self.ctx.filename).ok();
311 state = RecordState::RemoveFile;
312 }
313 self.ctx.tx.as_ref().map(|tx| tx.send(state));
314 }
315}
316
317#[cfg(feature = "hwcodec")]

Callers

nothing calls this directly

Calls 2

remove_fileFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected