Skip to content

Commit 305b42b

Browse files
committed
libsql: remove pub fields on SyncContext
1 parent b62a586 commit 305b42b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

libsql/src/local/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ impl Database {
401401
let max_frame_no = conn.wal_frame_count();
402402

403403
let generation = 1; // TODO: Probe from WAL.
404-
let start_frame_no = sync_ctx.durable_frame_num + 1;
404+
let start_frame_no = sync_ctx.durable_frame_num() + 1;
405405
let end_frame_no = max_frame_no;
406406

407407
let mut frame_no = start_frame_no;

libsql/src/sync.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ use crate::Result;
22

33
const DEFAULT_MAX_RETRIES: usize = 5;
44
pub struct SyncContext {
5-
pub sync_url: String,
6-
pub auth_token: Option<String>,
7-
pub max_retries: usize,
8-
pub durable_frame_num: u32,
5+
sync_url: String,
6+
auth_token: Option<String>,
7+
max_retries: usize,
8+
durable_frame_num: u32,
99
}
1010

1111
impl SyncContext {
@@ -92,4 +92,8 @@ impl SyncContext {
9292
nr_retries += 1;
9393
}
9494
}
95+
96+
pub(crate) fn durable_frame_num(&self) -> u32 {
97+
self.durable_frame_num
98+
}
9599
}

0 commit comments

Comments
 (0)