mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-08-04 11:00:05 +00:00
Update src/local_state.rs
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
This commit is contained in:
parent
18faece05e
commit
354dc0eff1
1 changed files with 1 additions and 1 deletions
|
@ -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:?}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue