Skip to content

Commit

Permalink
use BTreeMap instead of HashMap
Browse files Browse the repository at this point in the history
  • Loading branch information
cwbhhjl authored and xgaozoyoe committed Jun 3, 2024
1 parent 4a3fad5 commit 4ac6a0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/zkwasm/src/runtime/host/internal_circuit_plugin.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use specs::host_function::HostPlugin;
use specs::host_function::Signature;
use std::cell::RefCell;
use std::collections::HashMap;
use std::collections::BTreeMap;
use std::rc::Rc;
use wasmi::tracer::Observer;
use wasmi::FuncInstance;
Expand All @@ -21,16 +21,16 @@ pub(super) struct ForeignOp {
}

pub struct InternalCircuitEnv {
pub(super) plugins: HashMap<HostPlugin, ForeignPlugin>,
pub(super) functions: HashMap<String, ForeignOp>,
pub(super) plugins: BTreeMap<HostPlugin, ForeignPlugin>,
pub(super) functions: BTreeMap<String, ForeignOp>,
finalized: Rc<RefCell<bool>>,
}

impl InternalCircuitEnv {
pub(super) fn new(finalized: Rc<RefCell<bool>>) -> Self {
Self {
plugins: HashMap::new(),
functions: HashMap::new(),
plugins: BTreeMap::new(),
functions: BTreeMap::new(),
finalized,
}
}
Expand Down

0 comments on commit 4ac6a0b

Please sign in to comment.