move the RefUnwindSafe impls to shared/local state structs

This commit is contained in:
Niko Matsakis 2019-01-18 07:12:17 -05:00
parent 827828d6b5
commit 4158a4dba5
2 changed files with 4 additions and 7 deletions

View file

@ -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 {

View file

@ -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