mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 20:14:21 +01:00
core/io: Switch to Arc<Completion>
This commit is contained in:
@@ -444,8 +444,8 @@ impl DatabaseFile {
|
||||
}
|
||||
|
||||
impl limbo_core::DatabaseStorage for DatabaseFile {
|
||||
fn read_page(&self, page_idx: usize, c: limbo_core::Completion) -> limbo_core::Result<()> {
|
||||
let r = match c {
|
||||
fn read_page(&self, page_idx: usize, c: Arc<limbo_core::Completion>) -> limbo_core::Result<()> {
|
||||
let r = match *c {
|
||||
limbo_core::Completion::Read(ref r) => r,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
@@ -463,7 +463,7 @@ impl limbo_core::DatabaseStorage for DatabaseFile {
|
||||
&self,
|
||||
page_idx: usize,
|
||||
buffer: Arc<std::cell::RefCell<limbo_core::Buffer>>,
|
||||
c: limbo_core::Completion,
|
||||
c: Arc<limbo_core::Completion>,
|
||||
) -> limbo_core::Result<()> {
|
||||
let size = buffer.borrow().len();
|
||||
let pos = (page_idx - 1) * size;
|
||||
@@ -471,7 +471,7 @@ impl limbo_core::DatabaseStorage for DatabaseFile {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn sync(&self, c: limbo_core::Completion) -> limbo_core::Result<()> {
|
||||
fn sync(&self, c: Arc<limbo_core::Completion>) -> limbo_core::Result<()> {
|
||||
self.file.sync(c)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user