liquid-rust icon indicating copy to clipboard operation
liquid-rust copied to clipboard

`reverse` does not support operating on hashes

Open epage opened this issue 7 years ago • 1 comments

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

epage avatar Nov 30 '18 23:11 epage

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.

epage avatar Sep 04 '19 17:09 epage