mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-10 18:54:22 +01:00
Fix dumb clippy errors
This commit is contained in:
@@ -176,4 +176,8 @@ impl limbo_core::IO for IO {
|
||||
fn generate_random_number(&self) -> i64 {
|
||||
todo!();
|
||||
}
|
||||
|
||||
fn get_memory_io(&self) -> Option<Arc<limbo_core::MemoryIO>> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,10 @@ impl limbo_core::IO for PlatformIO {
|
||||
let random_f64 = Math_random();
|
||||
(random_f64 * i64::MAX as f64) as i64
|
||||
}
|
||||
|
||||
fn get_memory_io(&self) -> Option<Arc<limbo_core::MemoryIO>> {
|
||||
None // TODO: Make sure if memory isn't needed here
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
|
||||
@@ -5,12 +5,16 @@ use std::sync::Arc;
|
||||
use tracing::{debug, trace};
|
||||
use super::MemoryIO;
|
||||
|
||||
pub struct GenericIO {}
|
||||
pub struct GenericIO {
|
||||
memory_io: Arc<MemoryIO>,
|
||||
}
|
||||
|
||||
impl GenericIO {
|
||||
pub fn new() -> Result<Self> {
|
||||
debug!("Using IO backend 'generic'");
|
||||
Ok(Self {})
|
||||
Ok(Self {
|
||||
memory_io: Arc::new(MemoryIO::new()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@ pub struct WindowsIO {
|
||||
impl WindowsIO {
|
||||
pub fn new() -> Result<Self> {
|
||||
debug!("Using IO backend 'syscall'");
|
||||
Ok(Self {})
|
||||
Ok(Self {
|
||||
memory_io: Arc::new(MemoryIO::new()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +30,6 @@ impl IO for WindowsIO {
|
||||
.open(path)?;
|
||||
Ok(Arc::new(WindowsFile {
|
||||
file: RefCell::new(file),
|
||||
memory_io: Arc::new(MemoryIO::new()),
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#[cfg(feature = "fs")]
|
||||
use crate::error::LimboError;
|
||||
use crate::{io::Completion, Buffer, Result};
|
||||
use std::{cell::RefCell, sync::Arc};
|
||||
|
||||
@@ -4551,7 +4551,7 @@ pub fn op_open_ephemeral(
|
||||
let mv_cursor = match state.mv_tx_id {
|
||||
Some(tx_id) => {
|
||||
let table_id = root_page as u64;
|
||||
let mv_store = mv_store.as_ref().unwrap().clone();
|
||||
let mv_store = mv_store.unwrap().clone();
|
||||
let mv_cursor = Rc::new(RefCell::new(
|
||||
MvCursor::new(mv_store.clone(), tx_id, table_id).unwrap(),
|
||||
));
|
||||
|
||||
@@ -97,4 +97,8 @@ impl IO for SimulatorIO {
|
||||
fn generate_random_number(&self) -> i64 {
|
||||
self.rng.borrow_mut().next_u64() as i64
|
||||
}
|
||||
|
||||
fn get_memory_io(&self) -> Option<Arc<limbo_core::MemoryIO>> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user