Skip to content

Commit fa45edc

Browse files
committed
minor fixes
1 parent 7f1c10d commit fa45edc

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/sqlsync/examples/end-to-end-local-net.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn start_server<'a>(
8080
let coordinator = CoordinatorDocument::open(
8181
storage_journal,
8282
MemoryJournalFactory,
83-
&wasm_bytes[..],
83+
WasmReducer::new(wasm_bytes.as_slice())?,
8484
)?;
8585
let coordinator = Arc::new(Mutex::new(coordinator));
8686

@@ -112,7 +112,7 @@ fn start_server<'a>(
112112
}
113113

114114
fn handle_client(
115-
doc: Arc<Mutex<CoordinatorDocument<MemoryJournal>>>,
115+
doc: Arc<Mutex<CoordinatorDocument<MemoryJournal, WasmReducer>>>,
116116
socket: TcpStream,
117117
) -> anyhow::Result<()> {
118118
log::info!("server: received client connection");

lib/sqlsync/src/coordinator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rusqlite::Transaction;
88

99
use crate::db::{open_with_vfs, run_in_tx, ConnectionPair};
1010
use crate::error::Result;
11-
use crate::reducer::{Reducer, WasmReducer};
11+
use crate::reducer::Reducer;
1212
use crate::replication::{
1313
ReplicationDestination, ReplicationError, ReplicationSource,
1414
};
@@ -47,7 +47,7 @@ impl<J: Journal, R: Reducer> CoordinatorDocument<J, R> {
4747
pub fn open(
4848
storage: J,
4949
timeline_factory: J::Factory,
50-
reducer: R, // reducer_wasm_bytes: &[u8],
50+
reducer: R,
5151
) -> Result<Self> {
5252
let (mut sqlite, mut storage) = open_with_vfs(storage)?;
5353

@@ -141,7 +141,7 @@ impl<J: Journal, R: Reducer> CoordinatorDocument<J, R> {
141141
}
142142

143143
/// CoordinatorDocument knows how to replicate it's storage journal
144-
impl<J: Journal + ReplicationSource, R: Reducer> ReplicationSource
144+
impl<J: Journal + ReplicationSource, R> ReplicationSource
145145
for CoordinatorDocument<J, R>
146146
{
147147
type Reader<'a> = <J as ReplicationSource>::Reader<'a>

lib/sqlsync/src/timeline.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use crate::{
99
lsn::{Lsn, LsnRange},
1010
positioned_io::PositionedReader,
1111
reducer::{Reducer, ReducerError, WasmReducer},
12-
JournalError,
1312
};
1413

1514
const TIMELINES_TABLE_SQL: &str = "

0 commit comments

Comments
 (0)