Use Arc instead of Rc

This commit is contained in:
Syrus
2019-12-20 20:33:50 -08:00
parent 097353d0d4
commit c4d70a6b75
12 changed files with 16 additions and 35 deletions

View File

@ -5,7 +5,7 @@
use crate::backend::{Backend, RunnableModule};
use std::collections::BTreeMap;
use std::ops::Bound::{Included, Unbounded};
use std::{cell::RefCell, rc::Rc};
use std::sync::Arc;
/// An index to a register
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
@ -189,7 +189,7 @@ pub struct CodeVersion {
pub backend: Backend,
/// `RunnableModule` for this code version.
pub runnable_module: Rc<RefCell<Box<dyn RunnableModule>>>,
pub runnable_module: Arc<Box<dyn RunnableModule>>,
}
impl ModuleStateMap {