Skip to content

Add support for indexmap#527

Open
hardliner66 wants to merge 1 commit into
cobalt-org:masterfrom
hardliner66:master
Open

Add support for indexmap#527
hardliner66 wants to merge 1 commit into
cobalt-org:masterfrom
hardliner66:master

Conversation

@hardliner66

Copy link
Copy Markdown

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.

Comment thread crates/core/Cargo.toml
[features]
default = []
derive = ["liquid-derive"]
indexmap = ["dep:indexmap"]

Copy link
Copy Markdown
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
Copy Markdown
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