aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
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 /askama_derive
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.
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/Cargo.toml2
-rw-r--r--askama_derive/src/config.rs9
2 files changed, 3 insertions, 8 deletions
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))]