diff options
Diffstat (limited to 'core/ops.rs')
-rw-r--r-- | core/ops.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/ops.rs b/core/ops.rs index 2907d2552..d29159e9c 100644 --- a/core/ops.rs +++ b/core/ops.rs @@ -41,11 +41,8 @@ pub struct OpState { gotham_state: GothamState, } -impl Default for OpState { - // TODO(ry) Only deno_core should be able to construct an OpState. But I don't - // know how to make default private. Maybe rename to - // pub(crate) fn new() -> OpState - fn default() -> OpState { +impl OpState { + pub(crate) fn new() -> OpState { OpState { resource_table: Default::default(), op_table: OpTable::default(), @@ -119,7 +116,7 @@ impl Default for OpTable { #[test] fn op_table() { - let state = Rc::new(RefCell::new(OpState::default())); + let state = Rc::new(RefCell::new(OpState::new())); let foo_id; let bar_id; |