mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
formats.hocon: fix typo
This commit is contained in:
parent
f11a6a01cb
commit
2d71c78890
@ -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}
|
||||||
'';
|
'';
|
||||||
{
|
{
|
||||||
|
@ -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('}'));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user