mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-23 23:23:50 +03:00
use index map in state module
This commit is contained in:
parent
ae6ee186ad
commit
bcaf7d3e66
@ -52,6 +52,10 @@ default-features = false
|
||||
[dependencies.snarkos-utilities]
|
||||
version = "1.1.3"
|
||||
|
||||
[dependencies.indexmap]
|
||||
version = "1.6.0"
|
||||
features = ["serde-1"]
|
||||
|
||||
[dependencies.rand]
|
||||
version = "0.7"
|
||||
|
||||
|
@ -17,13 +17,13 @@
|
||||
use crate::InputValueError;
|
||||
use leo_ast::{InputValue, Parameter};
|
||||
|
||||
use std::collections::HashMap;
|
||||
use indexmap::IndexMap;
|
||||
|
||||
/// Returns the input parameter with the given name.
|
||||
/// If a parameter with the given name does not exist, then an error is returned.
|
||||
pub fn find_input(
|
||||
name: String,
|
||||
parameters: &HashMap<Parameter, Option<InputValue>>,
|
||||
parameters: &IndexMap<Parameter, Option<InputValue>>,
|
||||
) -> Result<InputValue, InputValueError> {
|
||||
let matched_parameter = parameters
|
||||
.iter()
|
||||
|
Loading…
Reference in New Issue
Block a user