formats.hocon: fix typo

This commit is contained in:
éclairevoyant 2024-07-23 12:07:07 -04:00
parent f11a6a01cb
commit 2d71c78890
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B
2 changed files with 4 additions and 4 deletions

View File

@ -70,10 +70,10 @@ in
} }
else else
assert lib.assertMsg (lib.isAttrs value) '' assert lib.assertMsg (lib.isAttrs value) ''
Value of invalid type provided to `hocon.lib.mkSubstition`: ${lib.typeOf value} Value of invalid type provided to `hocon.lib.mkSubstitution`: ${lib.typeOf value}
''; '';
assert lib.assertMsg (value ? "value") '' assert lib.assertMsg (value ? "value") ''
Argument to `hocon.lib.mkSubstition` is missing a `value`: Argument to `hocon.lib.mkSubstitution` is missing a `value`:
${builtins.toJSON value} ${builtins.toJSON value}
''; '';
{ {

View File

@ -77,12 +77,12 @@ fn parse_special_types(o: &Map<String, Value>) -> Option<HOCONValue> {
.get("value") .get("value")
.expect("Missing value for substitution") .expect("Missing value for substitution")
.as_str() .as_str()
.unwrap_or_else(|| panic!("Substition value is not a string: {:?}", o)); .unwrap_or_else(|| panic!("Substitution value is not a string: {:?}", o));
let required = o let required = o
.get("required") .get("required")
.unwrap_or(&Value::Bool(false)) .unwrap_or(&Value::Bool(false))
.as_bool() .as_bool()
.unwrap_or_else(|| panic!("Substition value is not a string: {:?}", o)); .unwrap_or_else(|| panic!("Substitution value is not a string: {:?}", o));
debug_assert!(!value.contains('}')); debug_assert!(!value.contains('}'));