liquid-rust
liquid-rust copied to clipboard
`reverse` does not support operating on hashes
Example test
assert_eq!(
v!([{ "a": 1, "b": 2 }]),
filters!(reverse, v!({"a": 1, "b": 2}))
);
- Rust implementation
- Ruby implementation
- Relevant tests
- Once this is working, ideally the test will start failing. We would just need to remove the
#[should_panic]on it - If the test doesn't start failing, please temporarily remove
#[should_panic], and find or create an issue for the new failure
- Once this is working, ideally the test will start failing. We would just need to remove the
The macro introduced here (as_sequence) should help fixing #246, #255, #256, #266 (and maybe others). It helps writing filters that take a value and "coerce" it into an array the same way Ruby's InputIterator does.