diff options
| author | troido <troido@protonmail.com> | 2020-02-10 11:55:20 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-10 11:55:20 +0100 |
| commit | f6d1d4ea258490670ee1605c596a6ba9a49a77db (patch) | |
| tree | dae5da3c0a5db2630a81999ffc298797082618ac /src/componentparameter.rs | |
| parent | b0e665f5436e08e4fd7446a59b87ac28f562a601 (diff) | |
inventories have capacity
Diffstat (limited to 'src/componentparameter.rs')
| -rw-r--r-- | src/componentparameter.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/componentparameter.rs b/src/componentparameter.rs index a76f243..6003b0d 100644 --- a/src/componentparameter.rs +++ b/src/componentparameter.rs @@ -39,7 +39,7 @@ impl ComponentParameter { } pub fn from_json(value: &Value) -> Result<Self, &'static str> { - let paramvalue = value.get(1).ok_or("index 0 not in component parameter")?; + let paramvalue = value.get(1).ok_or("index 1 not in component parameter")?; let typename = value.get(0).ok_or("index 0 not in component parameter")?.as_str().ok_or("compparam type not a string")?; if let Some(paramtype) = ParameterType::from_str(typename) { Ok(Self::Constant(Parameter::from_typed_json(paramtype, paramvalue).ok_or("failed to parse parameter constant")?)) |
