From 965df0dd43c44f9e34c2b7c9b1103814d165aab7 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Sun, 8 Jun 2025 08:26:47 +0300 Subject: [PATCH] s/skip_saftey_assert/skip_safety_assert/ --- libsql/src/database.rs | 10 +++++----- libsql/src/database/builder.rs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libsql/src/database.rs b/libsql/src/database.rs index 1362ec217a..bb07bb189d 100644 --- a/libsql/src/database.rs +++ b/libsql/src/database.rs @@ -84,7 +84,7 @@ enum DbType { path: String, flags: OpenFlags, encryption_config: Option, - skip_saftey_assert: bool, + skip_safety_assert: bool, }, #[cfg(feature = "replication")] Sync { @@ -166,7 +166,7 @@ cfg_core! { path: db_path.into(), flags, encryption_config: None, - skip_saftey_assert: false, + skip_safety_assert: false, }, max_write_replication_index: Default::default(), }) @@ -458,7 +458,7 @@ cfg_replication! { DbType::Sync { db, .. } => { let path = db.path().to_string(); Ok(Database { - db_type: DbType::File { path, flags: OpenFlags::default(), encryption_config: None, skip_saftey_assert: false }, + db_type: DbType::File { path, flags: OpenFlags::default(), encryption_config: None, skip_safety_assert: false }, max_write_replication_index: Default::default(), }) } @@ -580,11 +580,11 @@ impl Database { path, flags, encryption_config, - skip_saftey_assert, + skip_safety_assert, } => { use crate::local::impls::LibsqlConnection; - let db = if !skip_saftey_assert { + let db = if !skip_safety_assert { crate::local::Database::open(path, *flags)? } else { unsafe { crate::local::Database::open_raw(path, *flags)? } diff --git a/libsql/src/database/builder.rs b/libsql/src/database/builder.rs index 1969e1f511..ef70479430 100644 --- a/libsql/src/database/builder.rs +++ b/libsql/src/database/builder.rs @@ -175,7 +175,7 @@ cfg_core! { /// Using this setting is very UNSAFE and you are expected to use the libsql in adherence /// with the sqlite3 threadsafe rules or else you WILL create undefined behavior. Use at /// your own risk. - pub unsafe fn skip_saftey_assert(mut self, skip: bool) -> Builder { + pub unsafe fn skip_safety_assert(mut self, skip: bool) -> Builder { self.inner.skip_safety_assert = skip; self } @@ -206,7 +206,7 @@ cfg_core! { path, flags: self.inner.flags, encryption_config: self.inner.encryption_config, - skip_saftey_assert: self.inner.skip_safety_assert + skip_safety_assert: self.inner.skip_safety_assert }, max_write_replication_index: Default::default(), } @@ -321,7 +321,7 @@ cfg_replication! { /// Using this setting is very UNSAFE and you are expected to use the libsql in adherence /// with the sqlite3 threadsafe rules or else you WILL create undefined behavior. Use at /// your own risk. - pub unsafe fn skip_saftey_assert(mut self, skip: bool) -> Builder { + pub unsafe fn skip_safety_assert(mut self, skip: bool) -> Builder { self.inner.skip_safety_assert = skip; self }