Skip to content

Commit

Permalink
Update src/local_state.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Noah Lev <[email protected]>
  • Loading branch information
MichaReiser and camelid authored Jul 27, 2024
1 parent 18faece commit 354dc0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/local_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl LocalState {
let new_db = NonNull::from(db);

// Already attached? Assert that the database has not changed.
// NOTE: It's important to use `addr_eq` here because `NonNull` not only compares the address but also the type's metadata.
// NOTE: It's important to use `addr_eq` here because `NonNull::eq` not only compares the address but also the type's metadata.
if !std::ptr::addr_eq(current_db.as_ptr(), new_db.as_ptr()) {
panic!(
"Cannot change database mid-query. current: {current_db:?}, new: {new_db:?}",
Expand Down

0 comments on commit 354dc0e

Please sign in to comment.