Skip to content

Commit

Permalink
fix unwrap on none error
Browse files Browse the repository at this point in the history
  • Loading branch information
rebasedming committed Aug 5, 2024
1 parent 7ef6b0f commit 0e6af2d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ pub fn get_global_connection() -> Result<Arc<Mutex<Connection>>> {

if !connection_cached {
let conn = DuckdbConnection::default();
return Ok(DUCKDB_CONNECTION_CACHE
DUCKDB_CONNECTION_CACHE
.exclusive()
.insert(database_id, conn)
.expect("failed to cache connection")
.unwrap()
.0);
.expect("failed to cache connection");
}

Ok(DUCKDB_CONNECTION_CACHE
Expand Down

0 comments on commit 0e6af2d

Please sign in to comment.