From daa8d89b579f9a319e2bd9c59576e1d8ac76365e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 29 Sep 2023 14:02:11 +0200 Subject: Add MSRV checking in CI Bump MSRV to 1.65 for the use of let .. else. --- askama_derive/src/config.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'askama_derive/src/config.rs') 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 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))] -- cgit