Releases: martinohmann/hcl-rs
Releases · martinohmann/hcl-rs
v0.8.0
0.8.0 (2022-09-29)
⚠ BREAKING CHANGES
- The
Number
type was changed from anenum
to an opaquestruct
. UseNumber::from
to create a number from an integer. Furthermore, theFrom
implementations forf32
andf64
were removed. Use the newly addedNumber::from_f64
instead. - The
RawExpression
andString
variants of theObjectKey
enum were removed in favor of the newly addedExpression
variant. Furthermore the methodsObject::raw_expression
andObjectKey::string
were removed. UseObjectKey::from
instead. - The underlying map implementation for the
Object<K, V>
type changed fromIndexMap<K, V>
toVecMap<K, V>
. For the most common operations this is a drop-in replacement, butVecMap
lacks some of the more exotic APIs theIndexMap
provides. - Heredocs and quoted strings containing template interpolations and/or template directives are not parsed as
Expression::String
anymore, but end up asExpression::TemplateExpr
(which can be further parsed into the template elements viaTemplate::from_expr
) instead. Expressions of kindExpression::String
are guaranteed to not include any templating anymore.
Features
- add
Expression::Conditional
(#68) (e953ce1) - add
Expression::ElementAccess
(#63) (1f8c4d8) - add
Expression::ForExpr
(#70) (522bc80) - add
Expression::FuncCall
(#64) (d660712) - add
Expression::Operation
(#69) (4961a7c) - add
Expression::SubExpr
(#65) (e37f090) - add
Expression::VariableExpr
(#62) (2b6e81f) - allow any HCL expression as object key (#73) (e39496c)
- implement
PartialOrd
forNumber
(#75) (b520f4e) - implement arithmetic ops for
Number
(8d677d6) - implement template sub-language (#60) (12e88a3)
- use
VecMap
for object expressions (#72) (025cb68)
Bug Fixes
- allow
-
in identifiers (be06f53) - always do
f64
division (5591e22) - correctly handle
Expression::Null
in serializer (ae74def) - correctly handle
Expression
variants inExpressionSerializer
(#71) (8d89437) - prevent creation of infinite and NaN
Number
(#74) (f751fc0) - use correct deserializer for index element access (#67) (f7bdd5c)
Miscellaneous
- deps: bump vecmap-rs to 0.1.3 (5670415)