mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-01 15:00:57 +00:00
Minor clean-ups
* add missing softlinks * sorted `Cargo.toml`s in root and testing * suppress warnings in expanded code
This commit is contained in:
parent
e81ca4263e
commit
a101903871
1
.github/workflows/rust.yml
vendored
1
.github/workflows/rust.yml
vendored
@ -113,6 +113,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tool: cargo-sort
|
tool: cargo-sort
|
||||||
- run: |
|
- run: |
|
||||||
|
cargo sort --check --check-format --grouped
|
||||||
set -eu
|
set -eu
|
||||||
for PKG in \
|
for PKG in \
|
||||||
examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/salvo-app examples/warp-app fuzzing \
|
examples/actix-web-app examples/axum-app examples/poem-app examples/rocket-app examples/salvo-app examples/warp-app fuzzing \
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = ["rinja", "rinja_derive", "rinja_parser", "testing", "testing-alloc", "testing-no-std"]
|
members = [
|
||||||
|
"rinja",
|
||||||
|
"rinja_derive",
|
||||||
|
"rinja_parser",
|
||||||
|
"testing",
|
||||||
|
"testing-alloc",
|
||||||
|
"testing-no-std"
|
||||||
|
]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
@ -26,11 +26,14 @@ harness = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
rinja_derive = { version = "=0.3.5", path = "../rinja_derive" }
|
rinja_derive = { version = "=0.3.5", path = "../rinja_derive" }
|
||||||
|
|
||||||
percent-encoding = { version = "2.1.0", optional = true, default-features = false }
|
itoa = "1.0.11"
|
||||||
|
|
||||||
|
# needed by feature "serde_json"
|
||||||
serde = { version = "1.0", optional = true, default-features = false }
|
serde = { version = "1.0", optional = true, default-features = false }
|
||||||
serde_json = { version = "1.0", optional = true, default-features = false, features = [] }
|
serde_json = { version = "1.0", optional = true, default-features = false, features = [] }
|
||||||
|
|
||||||
itoa = "1.0.11"
|
# needed by feature "urlencode"
|
||||||
|
percent-encoding = { version = "2.1.0", optional = true, default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assert_matches = "1.5.0"
|
assert_matches = "1.5.0"
|
||||||
|
@ -136,9 +136,11 @@ impl<'a, 'h> Generator<'a, 'h> {
|
|||||||
where \
|
where \
|
||||||
RinjaW: rinja::helpers::core::fmt::Write + ?rinja::helpers::core::marker::Sized\
|
RinjaW: rinja::helpers::core::fmt::Write + ?rinja::helpers::core::marker::Sized\
|
||||||
{\
|
{\
|
||||||
use rinja::filters::{AutoEscape as _, WriteWritable as _};\
|
#[allow(unused_imports)]\
|
||||||
use rinja::helpers::ResultConverter as _;\
|
use rinja::{\
|
||||||
use rinja::helpers::core::fmt::Write as _;",
|
filters::{AutoEscape as _, WriteWritable as _},\
|
||||||
|
helpers::{ResultConverter as _, core::fmt::Write as _},\
|
||||||
|
};",
|
||||||
);
|
);
|
||||||
|
|
||||||
// Make sure the compiler understands that the generated code depends on the template files.
|
// Make sure the compiler understands that the generated code depends on the template files.
|
||||||
|
@ -35,9 +35,11 @@ fn compare(jinja: &str, expected: &str, fields: &[(&str, &str)], size_hint: usiz
|
|||||||
where
|
where
|
||||||
RinjaW: rinja::helpers::core::fmt::Write + ?rinja::helpers::core::marker::Sized,
|
RinjaW: rinja::helpers::core::fmt::Write + ?rinja::helpers::core::marker::Sized,
|
||||||
{
|
{
|
||||||
use rinja::filters::{AutoEscape as _, WriteWritable as _};
|
#[allow(unused_imports)]
|
||||||
use rinja::helpers::ResultConverter as _;
|
use rinja::{
|
||||||
use rinja::helpers::core::fmt::Write as _;
|
filters::{AutoEscape as _, WriteWritable as _},
|
||||||
|
helpers::{ResultConverter as _, core::fmt::Write as _},
|
||||||
|
};
|
||||||
#expected
|
#expected
|
||||||
rinja::Result::Ok(())
|
rinja::Result::Ok(())
|
||||||
}
|
}
|
||||||
|
1
testing/.rustfmt.toml
Symbolic link
1
testing/.rustfmt.toml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../.rustfmt.toml
|
@ -6,10 +6,13 @@ edition = "2021"
|
|||||||
rust-version = "1.81"
|
rust-version = "1.81"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[features]
|
[[bench]]
|
||||||
default = ["code-in-doc", "serde_json"]
|
name = "all"
|
||||||
code-in-doc = ["rinja/code-in-doc"]
|
harness = false
|
||||||
serde_json = ["dep:serde_json", "rinja/serde_json"]
|
|
||||||
|
[[bench]]
|
||||||
|
name = "normalize_identifier"
|
||||||
|
harness = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rinja = { path = "../rinja", version = "0.3.5" }
|
rinja = { path = "../rinja", version = "0.3.5" }
|
||||||
@ -27,13 +30,10 @@ criterion = "0.5"
|
|||||||
phf = { version = "0.11", features = ["macros" ] }
|
phf = { version = "0.11", features = ["macros" ] }
|
||||||
trybuild = "1.0.100"
|
trybuild = "1.0.100"
|
||||||
|
|
||||||
[[bench]]
|
[features]
|
||||||
name = "all"
|
default = ["code-in-doc", "serde_json"]
|
||||||
harness = false
|
code-in-doc = ["rinja/code-in-doc"]
|
||||||
|
serde_json = ["dep:serde_json", "rinja/serde_json"]
|
||||||
[[bench]]
|
|
||||||
name = "normalize_identifier"
|
|
||||||
harness = false
|
|
||||||
|
|
||||||
[lints.rust]
|
[lints.rust]
|
||||||
# Set in `build.rs` if we are compiling in stable rust, used by `ui.rs`
|
# Set in `build.rs` if we are compiling in stable rust, used by `ui.rs`
|
||||||
|
1
testing/LICENSE-APACHE
Symbolic link
1
testing/LICENSE-APACHE
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../LICENSE-APACHE
|
1
testing/LICENSE-MIT
Symbolic link
1
testing/LICENSE-MIT
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../LICENSE-MIT
|
1
testing/_typos.toml
Symbolic link
1
testing/_typos.toml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../_typos.toml
|
1
testing/deny.toml
Symbolic link
1
testing/deny.toml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../deny.toml
|
1
testing/tomlfmt.toml
Symbolic link
1
testing/tomlfmt.toml
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../tomlfmt.toml
|
Loading…
x
Reference in New Issue
Block a user