rinja-rs / rinja

A template rendering engine based on Jinja, generating type-safe Rust code at compile time.
https://rinja.readthedocs.io
Apache License 2.0
142 stars 10 forks source link

Make `with-axum` feature internal and remove mention from the book? #225

Open tyilo opened 1 week ago

tyilo commented 1 week ago

As you can't just use rinja::Template with the with-axum feature enabled, but need to use rinja_axum instead and rinja_axum automatically enables the with-axum feature, the feature is basically only needed for internal use.

If you already depend on rinja_axum, you will never need to enable the with-axum feature, so why expose this feature to the users of the library?

GuillaumeGomez commented 1 day ago

Good question. Do we have a use-case for users to mention this feature in the book @Kijewski ?

Kijewski commented 21 hours ago

No, we don't. Yes, it's bad that we mention the features in the book.

The rest of the description looks wrong, too. E.g. not an empty message in returned for errors, but e.g. an ErrorResponse which can be caught, styled, etc. by a handler, if I'm not mistaken.