Closed GuillaumeGomez closed 6 days ago
I think it might be best to simply remove (as_)ref
and deref
, what do you think? In #39 you introduce the prefix operators *
and &
, and I like these operators much better than filter. Esp. since the filters are kinda magic: You couldn't implement the yourself when you write your own filters.
Unfortunately I think these two filters remain useful in filters chaining. For example if you have a filter to_u32
which expects a &str
, then you need to do:
{{ "{{}}"|format(a)|ref|to_str }}
This example is easy to fix without these filters, but some more advanced might not. Allowing users to go around this limitation still seems pertinent to me.
Ah, yes, you're right. In a filter chain it is useful!
It's not calling the
AsRef
trait and I'd prefer to clear any potential confusion and to follow the same nomenclature asderef
.