Skip to content

Conversation

hardliner66
Copy link

I added the possibility to enable the use of an IndexMap inside of the templates. I currently use liquid in a tool of mine, where I use an IndexMap to keep elements in the order they were inserted in, as re-ordering those could lead to bugs further down.

@@ -38,3 +39,4 @@ snapbox = "0.4.14"
[features]
default = []
derive = ["liquid-derive"]
indexmap = ["dep:indexmap"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should suffix the feature with a 2 to track that this feature is for v2 (and allow us to support a v3, etc)?

Comment on lines +364 to +365
#[cfg(feature = "indexmap")]
impl<K: ObjectIndex, V: ValueView> ValueView for IndexMap<K, V> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you put this right after BTreeMaps impl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants