mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-02-08 21:35:47 +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>>,
|
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>
|
impl<DB> Default for Runtime<DB>
|
||||||
where
|
where
|
||||||
DB: Database,
|
DB: Database,
|
||||||
|
@ -446,6 +439,8 @@ struct SharedState<DB: Database> {
|
||||||
dependency_graph: Mutex<DependencyGraph<DB>>,
|
dependency_graph: Mutex<DependencyGraph<DB>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<DB> std::panic::RefUnwindSafe for SharedState<DB> where DB: Database {}
|
||||||
|
|
||||||
impl<DB: Database> Default for SharedState<DB> {
|
impl<DB: Database> Default for SharedState<DB> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SharedState {
|
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
|
/// 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
|
/// 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
|
/// the query from the stack -- in the case of unwinding, the guard's
|
||||||
|
|
Loading…
Reference in a new issue