21 Commits

Author SHA1 Message Date
René Kijewski
4e88a308c2
Merge pull request #24 from GuillaumeGomez/simplify-kws
Remove duplicated code to detect Rust keywords/identifiers
2024-06-23 15:06:28 +02:00
René Kijewski
1ce549d260 derive: add benchmark
This PR adds the crate "rinja_derive_standalone", which is just like
"rinja_derive", though not a "proc_macro". This way we can easily expose
it's internals for testing and benchmarking.

Right now, the PR is more or less a prove of concept, and it probably
needs a handful more useful benchmark use cases to be worth the hassle.
2024-06-22 02:49:01 +02:00
Guillaume Gomez
d4e36fa59e Remove duplicated code to detect Rust keywords/identifiers 2024-06-20 23:16:52 +02:00
René Kijewski
bdc3c79e95 Test UTF-8-ness only in #[test]s 2024-06-20 22:02:39 +02:00
René Kijewski
bf93f4a755 serde-json is actually called serde_json 2024-06-20 19:03:04 +02:00
René Kijewski
ad645e7a21 Don't capture std::fmt::Error in rinja::Error
`std::fmt::Error` does not know why it failed, only that it failed, as
it has a single value. This PR removes the captured value, to make the
code a bit more dense.
2024-06-19 00:12:51 +02:00
René Kijewski
435ecc2050
Merge pull request #5 from GuillaumeGomez/non-existent-feature
Fix cfg using non-existing feature
2024-06-18 23:48:54 +02:00
Guillaume Gomez
c4f7fed830 Fix cfg using non-existing feature 2024-06-18 23:45:39 +02:00
René Kijewski
b15b61cb2a Generator: reduce amount of intermediate allocations
No need to allocate a String, just to write it into another String
afterwards. This PR replaces the usages for `format!()` with
`format_args!()`.
2024-06-18 17:22:31 +02:00
Guillaume Gomez
3657569276 Remove returned Result from Buffer::writeln 2024-06-18 11:20:01 +02:00
Guillaume Gomez
8e964b964e Remove useless indent information from Buffer 2024-06-17 18:44:59 +02:00
Guillaume Gomez
e2eb76b860 Fix block partial rendering 2024-06-17 18:33:34 +02:00
Guillaume Gomez
e7a8acf42e Fix formatting 2024-06-17 17:25:11 +02:00
Guillaume Gomez
c49734d706 Fix clippy lints 2024-06-17 17:18:55 +02:00
Guillaume Gomez
32d2c6de27 Remove From trait implementations for CompileError 2024-06-17 17:18:55 +02:00
Guillaume Gomez
d6d1189cd5 Migrate errors with file information 2024-06-17 17:18:55 +02:00
Guillaume Gomez
cf4e2e5d22 Add Context::generate_error method 2024-06-17 17:18:55 +02:00
Guillaume Gomez
9699f636a7 Migrate config errors to new more complete CompileError version 2024-06-17 17:18:55 +02:00
Guillaume Gomez
21a9a160e6 Add askama_derive::FileInfo type 2024-06-17 17:18:55 +02:00
Guillaume Gomez
bf3934257c Update to new WithSpan type in askama_derive 2024-06-17 17:18:55 +02:00
Guillaume Gomez
2d80cc3524 Rename everything to rinja 2024-06-17 15:58:52 +02:00