aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-09-29 14:02:11 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-09-29 16:13:24 +0200
commitdaa8d89b579f9a319e2bd9c59576e1d8ac76365e (patch)
tree2ecbbc78851cbb2f79564ff6ca6d738bd59f567f
parente527f5f065bc384515929ccec497d66ad85830d1 (diff)
downloadaskama-daa8d89b579f9a319e2bd9c59576e1d8ac76365e.tar.gz
askama-daa8d89b579f9a319e2bd9c59576e1d8ac76365e.tar.bz2
askama-daa8d89b579f9a319e2bd9c59576e1d8ac76365e.zip
Add MSRV checking in CI
Bump MSRV to 1.65 for the use of let .. else.
-rw-r--r--.github/workflows/rust.yml9
-rw-r--r--askama/Cargo.toml2
-rw-r--r--askama_actix/Cargo.toml2
-rw-r--r--askama_axum/Cargo.toml2
-rw-r--r--askama_derive/Cargo.toml2
-rw-r--r--askama_derive/src/config.rs9
-rw-r--r--askama_escape/Cargo.toml2
-rw-r--r--askama_gotham/Cargo.toml2
-rw-r--r--askama_hyper/Cargo.toml2
-rw-r--r--askama_mendes/Cargo.toml2
-rw-r--r--askama_parser/Cargo.toml2
-rw-r--r--askama_rocket/Cargo.toml2
-rw-r--r--askama_tide/Cargo.toml2
-rw-r--r--askama_warp/Cargo.toml2
-rw-r--r--testing/Cargo.toml2
15 files changed, 24 insertions, 20 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 77eb07d..759edb3 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -54,6 +54,15 @@ jobs:
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets -- -D warnings
+ MSRV:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: "1.65.0"
+ - run: cargo check --lib -p askama --all-features
+
Audit:
runs-on: ubuntu-22.04
steps:
diff --git a/askama/Cargo.toml b/askama/Cargo.toml
index f70902b..438abcf 100644
--- a/askama/Cargo.toml
+++ b/askama/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "../README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[badges]
maintenance = { status = "actively-developed" }
diff --git a/askama_actix/Cargo.toml b/askama_actix/Cargo.toml
index 4c5dff1..a46dbff 100644
--- a/askama_actix/Cargo.toml
+++ b/askama_actix/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
actix-web = { version = "4", default-features = false }
diff --git a/askama_axum/Cargo.toml b/askama_axum/Cargo.toml
index 7c7d85e..034d235 100644
--- a/askama_axum/Cargo.toml
+++ b/askama_axum/Cargo.toml
@@ -2,7 +2,7 @@
name = "askama_axum"
version = "0.3.0"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
description = "Axum integration for Askama templates"
keywords = ["markup", "template", "jinja2", "html", "axum"]
categories = ["template-engine"]
diff --git a/askama_derive/Cargo.toml b/askama_derive/Cargo.toml
index cb4635f..5c3d8fa 100644
--- a/askama_derive/Cargo.toml
+++ b/askama_derive/Cargo.toml
@@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[lib]
proc-macro = true
diff --git a/askama_derive/src/config.rs b/askama_derive/src/config.rs
index a4eec28..b2a13aa 100644
--- a/askama_derive/src/config.rs
+++ b/askama_derive/src/config.rs
@@ -203,11 +203,12 @@ impl RawConfig<'_> {
}
}
-#[derive(Clone, Copy, PartialEq, Eq, Debug)]
+#[derive(Clone, Copy, Default, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "serde", derive(Deserialize))]
#[cfg_attr(feature = "serde", serde(field_identifier, rename_all = "lowercase"))]
pub(crate) enum WhitespaceHandling {
/// The default behaviour. It will leave the whitespace characters "as is".
+ #[default]
Preserve,
/// It'll remove all the whitespace characters before and after the jinja block.
Suppress,
@@ -227,12 +228,6 @@ impl From<WhitespaceHandling> for Whitespace {
}
}
-impl Default for WhitespaceHandling {
- fn default() -> Self {
- WhitespaceHandling::Preserve
- }
-}
-
#[cfg_attr(feature = "serde", derive(Deserialize))]
struct General<'a> {
#[cfg_attr(feature = "serde", serde(borrow))]
diff --git a/askama_escape/Cargo.toml b/askama_escape/Cargo.toml
index 8214ea8..654f49a 100644
--- a/askama_escape/Cargo.toml
+++ b/askama_escape/Cargo.toml
@@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[badges]
maintenance = { status = "actively-developed" }
diff --git a/askama_gotham/Cargo.toml b/askama_gotham/Cargo.toml
index 1e3c352..15ea507 100644
--- a/askama_gotham/Cargo.toml
+++ b/askama_gotham/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-gotham", "mime", "mime_guess"] }
diff --git a/askama_hyper/Cargo.toml b/askama_hyper/Cargo.toml
index 113ca02..02fcc58 100644
--- a/askama_hyper/Cargo.toml
+++ b/askama_hyper/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-hyper"] }
diff --git a/askama_mendes/Cargo.toml b/askama_mendes/Cargo.toml
index 3811d24..ae5a0a4 100644
--- a/askama_mendes/Cargo.toml
+++ b/askama_mendes/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-mendes", "mime", "mime_guess"] }
diff --git a/askama_parser/Cargo.toml b/askama_parser/Cargo.toml
index 8af58df..577e435 100644
--- a/askama_parser/Cargo.toml
+++ b/askama_parser/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
nom = { version = "7", default-features = false, features = ["alloc"] }
diff --git a/askama_rocket/Cargo.toml b/askama_rocket/Cargo.toml
index e9f5afe..0496a34 100644
--- a/askama_rocket/Cargo.toml
+++ b/askama_rocket/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-rocket", "mime", "mime_guess"] }
diff --git a/askama_tide/Cargo.toml b/askama_tide/Cargo.toml
index eff0073..42762ac 100644
--- a/askama_tide/Cargo.toml
+++ b/askama_tide/Cargo.toml
@@ -2,7 +2,7 @@
name = "askama_tide"
version = "0.15.1"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
description = "Tide integration for Askama templates"
keywords = ["markup", "template", "html", "tide", "http-types"]
homepage = "https://github.com/djc/askama"
diff --git a/askama_warp/Cargo.toml b/askama_warp/Cargo.toml
index e1176da..b0efe48 100644
--- a/askama_warp/Cargo.toml
+++ b/askama_warp/Cargo.toml
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
workspace = ".."
readme = "README.md"
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
[dependencies]
askama = { version = "0.12", path = "../askama", default-features = false, features = ["with-warp", "mime", "mime_guess"] }
diff --git a/testing/Cargo.toml b/testing/Cargo.toml
index 89fd864..23b5743 100644
--- a/testing/Cargo.toml
+++ b/testing/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"]
workspace = ".."
edition = "2021"
-rust-version = "1.58"
+rust-version = "1.65"
publish = false
[features]