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
Note the little comma after the ("/history", "History") tuple in the second example.
I'm not sure if this is trivial to implement or not, but I thought I might bring it to y'alls' attention.
It wasn't that of a big deal in the end though, so I wouldn't call this a "major issue" or whatever, not by a long shot. Though, since Rust allows such trailing commas, I think askama should as well.
For reference, this is the error I got:
error: problems parsing template source at row 30, column 31 near:
",\n ] %}\n <div class=\"gap-x-6 leadi"...
--> src/routes/mod.rs:96:10
|
96 | #[derive(Template)]
| ^^^^^^^^
|
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
Running with RUSTFLAGS="-Zmacro-backtrace" cargo +nightly build gives the following:
error: problems parsing template source at row 30, column 31 near:
",\n ] %}\n <div class=\"gap-x-6 leadi"...
--> src/routes/mod.rs:96:10
|
96 | #[derive(Template)]
| ^^^^^^^^ in this derive macro expansion
|
::: /home/max/.cargo/registry/src/index.crates.io-6f17d22bba15001f/askama_derive-0.12.5/src/lib.rs:22:1
|
22 | pub fn derive_template(input: TokenStream) -> TokenStream {
| --------------------------------------------------------- in this expansion of `#[derive(Template)]`
Neither error was too helpful, but it does point to line 30, column 31, which in my code is precisely the closing parenthesis before the trailing comma; careful reading helps at least.
The text was updated successfully, but these errors were encountered:
Basically what the title says.
To give an example of what I mean, this here compiles just fine:
But this here doesn't:
Note the little comma after the
("/history", "History")
tuple in the second example.I'm not sure if this is trivial to implement or not, but I thought I might bring it to y'alls' attention.
It wasn't that of a big deal in the end though, so I wouldn't call this a "major issue" or whatever, not by a long shot. Though, since Rust allows such trailing commas, I think
askama
should as well.For reference, this is the error I got:
Running with
RUSTFLAGS="-Zmacro-backtrace" cargo +nightly build
gives the following:Neither error was too helpful, but it does point to line 30, column 31, which in my code is precisely the closing parenthesis before the trailing comma; careful reading helps at least.
The text was updated successfully, but these errors were encountered: