Skip to content

Commit 8ab446a

Browse files
committed
update encryption sync example
1 parent 6a815d6 commit 8ab446a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libsql/examples/encryption_sync.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ async fn main() {
2525
None
2626
};
2727

28-
let db_builder =
29-
Builder::new_synced_database(db_path, sync_url, auth_token).remote_encryption(encryption);
28+
let mut db_builder = Builder::new_synced_database(db_path, sync_url, auth_token);
29+
30+
if let Some(enc) = encryption {
31+
db_builder = db_builder.remote_encryption(enc);
32+
}
3033

3134
let db = match db_builder.build().await {
3235
Ok(db) => db,

0 commit comments

Comments
 (0)