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

`uniq` of a scalar should be an array of the scalar

Open epage opened this issue 7 years ago • 1 comments

Example test:

    assert_eq!(v!(["foo"]), filters!(uniq, v!("foo")));
  • 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 Dec 01 '18 01:12 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