Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
penberg committed Nov 12, 2024
1 parent 5db90a4 commit 50ede27
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libsql/examples/offline_writes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ async fn main() {
})
.unwrap();

let namespace = std::env::var("LIBSQL_NAMESPACE").ok();

// The authentication token to use.
let auth_token = std::env::var("LIBSQL_AUTH_TOKEN").unwrap_or("".to_string());

let db_builder = if let Some(ns) = namespace {
Builder::new_synced_database(db_path, sync_url, auth_token).namespace(&ns)
} else {
Builder::new_synced_database(db_path, sync_url, auth_token)
};
let db_builder = Builder::new_synced_database(db_path, sync_url, auth_token);

let db = match db_builder.build().await {
Ok(db) => db,
Expand Down

0 comments on commit 50ede27

Please sign in to comment.