Skip to content

Commit f4cb77a

Browse files
committed
chore: fix cargo fmt and bump package.json to 0.1.22
1 parent 2188b38 commit f4cb77a

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npiesco/absurder-sql",
3-
"version": "0.1.21",
3+
"version": "0.1.22",
44
"description": "High-performance SQLite for browsers with IndexedDB persistence. Export/import databases, multi-tab coordination, dual-mode (browser + native).",
55
"type": "module",
66
"main": "./pkg/absurder_sql.js",

src/lib.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2501,18 +2501,25 @@ impl Database {
25012501
let err_msg = unsafe {
25022502
let msg_ptr = sqlite_wasm_rs::sqlite3_errmsg(db);
25032503
if !msg_ptr.is_null() {
2504-
std::ffi::CStr::from_ptr(msg_ptr).to_string_lossy().into_owned()
2504+
std::ffi::CStr::from_ptr(msg_ptr)
2505+
.to_string_lossy()
2506+
.into_owned()
25052507
} else {
25062508
"Unknown error".to_string()
25072509
}
25082510
};
2509-
return Err(format!("Failed to reopen database after import: {}", err_msg));
2511+
return Err(format!(
2512+
"Failed to reopen database after import: {}",
2513+
err_msg
2514+
));
25102515
}
25112516

25122517
log::info!("[IMPORT] Database reopened successfully");
25132518
Ok(db)
25142519
})
2515-
.map_err(|e| JsValue::from_str(&format!("Failed to reopen connection after import: {}", e)))?;
2520+
.map_err(|e| {
2521+
JsValue::from_str(&format!("Failed to reopen connection after import: {}", e))
2522+
})?;
25162523

25172524
// Update our connection state to use the new connection
25182525
self.connection_state = new_state;

0 commit comments

Comments
 (0)