mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-06 08:44:23 +01:00
Last cleanups of old completion api
This commit is contained in:
@@ -343,13 +343,11 @@ impl File for UringFile {
|
||||
let c_uring = c.clone();
|
||||
io.ring.submit_entry(
|
||||
&write,
|
||||
Arc::new(Completion::new(CompletionType::Write(
|
||||
WriteCompletion::new(Box::new(move |result| {
|
||||
c_uring.complete(result);
|
||||
// NOTE: Explicitly reference buffer to ensure it lives until here
|
||||
let _ = buffer.borrow();
|
||||
})),
|
||||
))),
|
||||
Arc::new(Completion::new_write(move |result| {
|
||||
c_uring.complete(result);
|
||||
// NOTE: Explicitly reference buffer to ensure it lives until here
|
||||
let _ = buffer.borrow();
|
||||
})),
|
||||
);
|
||||
Ok(c)
|
||||
}
|
||||
|
||||
@@ -431,9 +431,7 @@ impl BTreeGenerator<'_> {
|
||||
}
|
||||
|
||||
fn write_at(io: &impl IO, file: Arc<dyn File>, offset: usize, data: &[u8]) {
|
||||
let completion = Completion::new(CompletionType::Write(WriteCompletion::new(Box::new(
|
||||
|_| {},
|
||||
))));
|
||||
let completion = Completion::new_write(|_| {});
|
||||
let drop_fn = Rc::new(move |_| {});
|
||||
#[allow(clippy::arc_with_non_send_sync)]
|
||||
let buffer = Arc::new(RefCell::new(Buffer::new(Pin::new(data.to_vec()), drop_fn)));
|
||||
|
||||
Reference in New Issue
Block a user