From 6422139fe0655399d63438c8ce91111ebb4497ae Mon Sep 17 00:00:00 2001 From: Daniel Rainer Date: Fri, 31 Oct 2025 17:52:19 +0100 Subject: [PATCH] cleanup: derive `Default` where possible Not doing so triggers a clippy lint on Rust >= 1.91. Part of #12013 --- src/builtins/block.rs | 2 +- src/highlight/highlight.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/builtins/block.rs b/src/builtins/block.rs index 4fcb2fcbd..0db077605 100644 --- a/src/builtins/block.rs +++ b/src/builtins/block.rs @@ -3,7 +3,7 @@ // Implementation of the block builtin. use super::prelude::*; -#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] enum Scope { #[default] Unset, diff --git a/src/highlight/highlight.rs b/src/highlight/highlight.rs index 46aca5a56..eac7ba676 100644 --- a/src/highlight/highlight.rs +++ b/src/highlight/highlight.rs @@ -1213,9 +1213,8 @@ fn get_fallback(role: HighlightRole) -> HighlightRole { } /// Describes the role of a span of text. -#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] +#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)] #[repr(u8)] -#[derive(Default)] pub enum HighlightRole { #[default] normal, // normal text