diff options
Diffstat (limited to 'askama_derive')
-rw-r--r-- | askama_derive/Cargo.toml | 2 | ||||
-rw-r--r-- | askama_derive/src/config.rs | 9 |
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))] |