| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version.
- [Commits](https://github.com/djc/mendes/commits)
---
updated-dependencies:
- dependency-name: mendes
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a shorthand for defining and calling macros when
using them as a reusable substitute for variables assigned complex values
(e.g. string literals with or without newline escapes). The use-case is
formatting - from my experience it's easier to visually parse a `macro`
`endmacro` block than a multiline variable assignment.
Signed-off-by: mataha <mataha@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0)
---
updated-dependencies:
- dependency-name: criterion
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Every integration crate but `askama_tide` exports `askama::*`. This PR
makes `askama_tide` behave the same as every other `integration crate`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`String::with_capacity()` panics if the requested memory could not be
allocated. `Template::render()` is fallible method, and the fact that it
can panic is not documented.
This commit uses `String::try_reserve()` instead, so even for an
exceedingly large `SIZE_HINT` the method should not panic. In the
generated code `write!()` calls will fail instead with
`Err(std::fmt::Error)`.
I do not test if `try_reserve()` returned an error, because the
rendering might succeed anyway, if less bytes are written than estimated.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Escaped HTML characters vary in length. So, in order to select the
correct replacement two variables need to be loaded: The pointer to the
new substring and its length. Because of this the generated code is less
dense than it could be.
With this PR instead of selecting the appropriate `&str`, an `&&str` is
selected. The former consumes two words while the latter consumes only
one. Intuitively one might assume that the double dereference makes the
code slower, but the optimized lookup seems to be so much faster, so
that the change is worth its weight.
Comparing the result of `cargo bench` (best out of three runs for both):
```text
Old: [4.3592 µs 4.3675 µs 4.3764 µs]
New: [3.8691 µs 3.8766 µs 3.8860 µs]
Diff: [-11.24 % -11.24 % -12.21 % ]
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version.
- [Release notes](https://github.com/djc/mendes/releases)
- [Commits](https://github.com/djc/mendes/commits)
---
updated-dependencies:
- dependency-name: mendes
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Closes #786
|
| |
|
|
|
|
|
|
|
|
|
| |
The previous implementation hid the error returned by render,
which made it impossible for callers to react to rendering errors.
While having a simple way to call into would be nice, there is not
way to have both implementations without adding any manual
specialization. Thus, the From impl is replaced by the TryFrom impl.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
with-hyper now derives an impl allowing Templates to be passed
to functions with trait bounds for Into<hyper::Body>.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`parser.rs` was a single file containing almost 2000 lines.
This PR split the file into multiple, smaller files. `Expr`, `Node`, and
`Target` each get an own file. Each struct gets a `parse()` method that
return `Result<Self>`, and every other detail is private to the file.
This PR should make this essential part of Askama more easy to
understand, and make future modifications easier.
|
| |
|
|
|
|
|
| |
Since version 0.6, `toml` is a wrapper around `toml_edit`, and the more
basic library already meets our needs.
|
|
|
|
|
|
|
| |
The configuration is made `'static`, because `toml` and `toml_edit` both
needs to implement serde's `DeserializeOwned` by now. We allocate the
strings once per template, so it is very unlikely that this change will
have any measurable impact, neither in compile time nor RAM usage.
|
| |
|
|
|
|
|
|
|
|
| |
In <https://github.com/dtolnay/trybuild/pull/219> the output of error
messages was subtly changed, because they introduced a subdirectoy in
their temp path.
This PR fixes the mismatch between the expected and the actual output.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updates the requirements on [comrak](https://github.com/kivikakk/comrak) to permit the latest version.
- [Release notes](https://github.com/kivikakk/comrak/releases)
- [Changelog](https://github.com/kivikakk/comrak/blob/main/changelog.txt)
- [Commits](https://github.com/kivikakk/comrak/compare/0.14.0...0.15.0)
---
updated-dependencies:
- dependency-name: comrak
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
|