René Kijewski
b49e42f0ea
Use cargo reference manifest section order
...
In [#131 ] I added a check that ensures that the section in `Cargo.toml`
(and there values) are in a specific order. I invented the order quite
randomly, in the order which I thought might be useful.
This PR changes the order to be the same as in Cargo's reference about
[The Manifest Format]. Also some missing softlinks were added.
[#131 ]: <https://github.com/rinja-rs/rinja/pull/131 >
[The Manifest Format]: <https://doc.rust-lang.org/cargo/reference/manifest.html >
2024-12-13 10:00:48 +01:00
Guillaume Gomez
b16056534f
Merge pull request #284 from Kijewski/pr-rust-1.85.0-warnings
...
Fix clippy warnings in rust nightly 1.85
2024-12-11 22:40:06 +01:00
René Kijewski
430b99bdac
Fix clippy warnings in rust nightly 1.85
2024-12-11 19:50:29 +01:00
René Kijewski
e08c28c126
Only run UI tests on stable rust
2024-12-11 19:50:29 +01:00
Guillaume Gomez
96e9815fd5
Merge pull request #278 from Kijewski/issue-272
...
Add failing test from issue 272
2024-11-26 13:46:21 +01:00
Guillaume Gomez
23f61306cc
Merge pull request #277 from Kijewski/pr-error
...
Make working with `Error`s a bit easier
2024-11-26 11:16:57 +01:00
René Kijewski
66dac1df06
Add failing test from issue 272
...
Reported by Ciprian Dorin Craciun ([@cipriancraciun]) in issue [#272 ].
[#272 ]: <https://github.com/rinja-rs/rinja/issues/272 >
[@cipriancraciun]: <https://github.com/cipriancraciun >
2024-11-26 07:23:37 +01:00
René Kijewski
ed5f485642
Make working with Error
s a bit easier
2024-11-26 05:57:09 +01:00
Ed Page
e31f4e210e
refactor(parser): Be explicit about i
nput state ( #275 )
...
* refactor(parser): In 'filter', name a checkpoint
* refactor(parser): In 'Target::named', name a checkpoint
* refactor(parser): In 'Target::named', remove a checkpoint
* refactor(parser): In 'Target::rest', name a checkpoint
* refactor(parser): In 'Target::parse_one', name a checkpoint
* refactor(parser): In 'Target::parse', align the input
* refactor(parser): In 'Expr::is_as', name a checkpoint
* refactor(parser): In 'Expr::concat', name a checkpoint
* refactor(parser): In 'Suffix::parse', name a checkpoint
* refactor(parser): In 'Node::break', name a checkpoint
* refactor(parser): In 'Node::continue', name a checkpoint
* refactor(parser): In 'Macro::parse', name a checkpoint
* refactor(parser): In 'When::else', name a checkpoint
2024-11-25 23:56:11 +01:00
René Kijewski
c1e59c4296
Merge pull request #274 from Kijewski/pr-no-generics-cloning
...
derive: remove generics injection for `write_header()`
2024-11-25 22:10:41 +01:00
René Kijewski
45aac915b3
derive: remove generics injection for write_header()
...
With the integrations gone, this feature is not needed anymore.
2024-11-25 21:45:37 +01:00
Guillaume Gomez
8ec8f21e66
Merge pull request #271 from Kijewski/pr-no-integrations
...
Remove integrations and `MIME_TYPE` guessing
2024-11-25 15:08:11 +01:00
René Kijewski
20e9c2f000
Remove const Template::Template
2024-11-25 03:03:16 +01:00
René Kijewski
69ad5ea026
Remove integration crates
2024-11-25 03:03:15 +01:00
René Kijewski
87f611e871
Merge pull request #257 from Kijewski/pr-smaller-span
...
parser: shrink the size of `WithSpan` to one register
2024-11-24 22:47:10 +01:00
René Kijewski
611647a82b
derive: replace generic &WithSpan<'_, T>
with Span
where possible
2024-11-24 22:31:52 +01:00
René Kijewski
47c3f6cc65
parser: shrink the size of WithSpan
to one register
2024-11-24 22:30:47 +01:00
Guillaume Gomez
067fd379b8
Merge pull request #270 from Kijewski/pr-saturating
...
`std::num::Saturating` is stable since rust 1.74
2024-11-24 21:11:56 +01:00
René Kijewski
2688da0b2f
std::num::Saturating
is stable since rust 1.74
2024-11-24 20:50:31 +01:00
Guillaume Gomez
829ebb0ab3
Merge pull request #266 from Kijewski/pr-enum-optimizations
...
Second round of optimizations extracted from PR to implement `enum` variants
2024-11-24 20:45:09 +01:00
Guillaume Gomez
2aa3db966f
Merge pull request #268 from Kijewski/pr-no-proc-macro
...
derive standalone: opt out of native `proc-macro` support
2024-11-24 20:02:56 +01:00
Guillaume Gomez
8da1865912
Merge pull request #269 from Kijewski/pr-safer-match-on-unit-structs
...
derive: a safe-guard to disable bindings a unit struct was expected
2024-11-24 20:02:12 +01:00
René Kijewski
50f50e3931
derive: a safe-guard to disable bindings a unit struct was expected
...
This does not fix the error, as rinja is not able to tell was the
actually intended to do, but rust gives you a guide what the error is,
and the error is not silently ignored.
2024-11-24 19:06:47 +01:00
René Kijewski
78136c2351
derive standalone: opt out of native proc-macro
support
...
We know that there is none, because `rinja_derive_standalone` is not run
inside of rust, but, as the name says, standalone. This makes the
playground WASM data a little smaller.
2024-11-24 18:57:53 +01:00
René Kijewski
87ee5fb948
Templates always implement FastWritable
2024-11-24 18:24:37 +01:00
René Kijewski
ebbd9ce4c8
derive: make PartialTemplateArgs::new()
return None
if there is no #[template]
2024-11-24 18:24:37 +01:00
René Kijewski
9488f218d4
derive: only one, re-usable template_to_string()
function
2024-11-24 18:24:37 +01:00
René Kijewski
0d39b84fc0
derive: do not clone #[doc]
attributes
2024-11-24 18:24:35 +01:00
René Kijewski
9527d14d7f
derive: capture source = …
value into an Arc
for cheaper cloning
2024-11-24 17:25:58 +01:00
René Kijewski
bef7c3a38c
derive: fix missing import
2024-11-24 17:24:07 +01:00
Guillaume Gomez
e4b89797b0
Merge pull request #260 from Kijewski/pr-stuff-in-derive
...
derive: some clean-ups and optimizations
2024-11-24 01:29:33 +01:00
René Kijewski
85f06449ac
derive: remove needless format!()
calls
2024-11-24 01:16:29 +01:00
René Kijewski
e2515bdacb
derive: reword in_doc
error message if code block is absent
2024-11-24 01:08:51 +01:00
René Kijewski
acd27514d0
derive: do not capture string when we have the parsed value
2024-11-24 01:08:51 +01:00
René Kijewski
51deb4d048
derive: parse whitespace
early and pass parsed value around instead of an &str
2024-11-24 01:08:51 +01:00
René Kijewski
8055e37411
Unify Whitespace
and WhitespaceHandling
2024-11-24 01:08:51 +01:00
René Kijewski
d4657fae5c
derive CompileError::rendered: bool
is unused
2024-11-24 01:08:51 +01:00
René Kijewski
277cdb4f87
derive: PartialTemplateArgs
actually does not need keep track of the argument keys
2024-11-24 01:08:51 +01:00
René Kijewski
8709364c9a
Merge pull request #264 from GuillaumeGomez/allow-variables-inheritance-in-block
...
Allow variables inheritance in block
2024-11-24 00:22:04 +01:00
René Kijewski
476a50d184
book: add retry to download
2024-11-24 00:07:59 +01:00
René Kijewski
e182022f87
derive: fix lifetimes for sub-generators
...
Remove inheritance from `MapChain`, and simply open a new scope.
Add lifetime to `Generator` and `Heritage` to reference its root
context.
2024-11-23 23:55:12 +01:00
René Kijewski
466b92559a
derive: MapChain does not need to be generic
2024-11-23 21:03:21 +01:00
Guillaume Gomez
07e6216e83
Allow variables to be inherited in blocks
2024-11-22 18:44:42 +01:00
Guillaume Gomez
0edbca2b60
Fix variables not inherited from parent
2024-11-22 18:20:14 +01:00
Guillaume Gomez
9173cb3cd2
Merge pull request #262 from chrisp60/fix-259-macro-arg-kw
...
fix: normalize macro args on call (fixes #259 )
2024-11-21 21:51:27 +01:00
chrisp60
0018b3bf77
fix: normalize macro args on call #259
2024-11-21 08:58:11 -05:00
René Kijewski
35b8433acb
Merge pull request #261 from Kijewski/pr-there-can-only-be-one-fuzz
...
parser: remove obsolete parser fuzzing
2024-11-21 00:09:41 +01:00
René Kijewski
f7917d57c1
parser: remove obsolete parser fuzzing
...
The fuzzing we inherited from askama only tested the parser. In rinja we
parse multiple aspects of the project in a unified crate: `fuzzing`.
Everything the old fuzzer did is included in the new fuzzer, and more.
2024-11-20 23:55:51 +01:00
Guillaume Gomez
b856eb8d44
Merge pull request #244 from GuillaumeGomez/allow-underscore
...
Allow idents to start with `_`
2024-11-20 15:13:05 +01:00
Guillaume Gomez
2ec7740894
Update license in deny.toml
2024-11-20 15:00:18 +01:00