mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-02 09:46:06 +00:00
move the RefUnwindSafe impls to shared/local state structs
This commit is contained in:
parent
827828d6b5
commit
4158a4dba5
2 changed files with 4 additions and 7 deletions
|
@ -37,13 +37,6 @@ pub struct Runtime<DB: Database> {
|
|||
shared_state: Arc<SharedState<DB>>,
|
||||
}
|
||||
|
||||
impl<DB> std::panic::RefUnwindSafe for Runtime<DB>
|
||||
where
|
||||
DB: Database,
|
||||
DB::DatabaseStorage: std::panic::RefUnwindSafe,
|
||||
{
|
||||
}
|
||||
|
||||
impl<DB> Default for Runtime<DB>
|
||||
where
|
||||
DB: Database,
|
||||
|
@ -446,6 +439,8 @@ struct SharedState<DB: Database> {
|
|||
dependency_graph: Mutex<DependencyGraph<DB>>,
|
||||
}
|
||||
|
||||
impl<DB> std::panic::RefUnwindSafe for SharedState<DB> where DB: Database {}
|
||||
|
||||
impl<DB: Database> Default for SharedState<DB> {
|
||||
fn default() -> Self {
|
||||
SharedState {
|
||||
|
|
|
@ -80,6 +80,8 @@ impl<DB: Database> LocalState<DB> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<DB> std::panic::RefUnwindSafe for LocalState<DB> where DB: Database {}
|
||||
|
||||
/// When a query is pushed onto the `active_query` stack, this guard
|
||||
/// is returned to represent its slot. The guard can be used to pop
|
||||
/// the query from the stack -- in the case of unwinding, the guard's
|
||||
|
|
Loading…
Reference in a new issue