You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been thinking about filters and how they are structured. In parse.rs we get the filter type. Then we implement render for filter, and thus match it on filter type, and returning the correct behaviour there. We get a very long match statement there, and it has a tendency to get a bit unwieldy.
An idea that could perhaps work would be to use unitstructs in FilterType.
Given we can then implement a trait apply for filter, and each filter would implement that. I think that could possibly be a pretty nice way of decoupling and breaking up that big match statement.
We need to support every filter in https://docs.djangoproject.com/en/5.1/ref/templates/builtins/#ref-templates-builtins-filters. They can be added as variants to the
Filter
enum insrc/parse.rs
.The text was updated successfully, but these errors were encountered: