mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-23 21:20:05 +00:00
Merge pull request #115 from nikomatsakis/move-unwind-safe-impls
move the RefUnwindSafe impls to shared/local state structs
This commit is contained in:
commit
3e81f12dd2
2 changed files with 9 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,13 @@ struct SharedState<DB: Database> {
|
|||
dependency_graph: Mutex<DependencyGraph<DB>>,
|
||||
}
|
||||
|
||||
impl<DB> std::panic::RefUnwindSafe for SharedState<DB>
|
||||
where
|
||||
DB: Database,
|
||||
DB::DatabaseStorage: std::panic::RefUnwindSafe,
|
||||
{
|
||||
}
|
||||
|
||||
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