fix: fix cargo fmt and update tests for completion/snippet changes

- Run cargo fmt on duckdb_driver.rs
- Update test expectations for snippet→function type changes
- Fix snippet icon color test (emerald→violet)
- Fix error result message format test
- Fix keyword suggestion test to handle snippet boost priority
This commit is contained in:
t8y2 committed 2026-05-27 18:26:22 +08:00
1 parent 4207a891d1
commit 6d35dcfda8
4 files changed
+16 -17

No files matched your search

+7 -9
View File
@@ -61,16 +61,14 @@ pub fn is_memory_database_path(path: &str) -> bool {
/// On Windows this prevents "file already in use" errors when reconnecting.
pub fn close_connection(con: Arc<Mutex<duckdb::Connection>>) {
match Arc::try_unwrap(con) {
Ok(mutex) => {
match mutex.into_inner() {
Ok(conn) => {
let _ = conn.close();
}
Err(poisoned) => {
let _ = poisoned.into_inner().close();
}
Ok(mutex) => match mutex.into_inner() {
Ok(conn) => {
let _ = conn.close();
}
}
Err(poisoned) => {
let _ = poisoned.into_inner().close();
}
},
Err(_) => {
// Arc still referenced elsewhere (e.g. running queries);
// the last holder will drop and close the connection.