From 4c883f12b4761c7e0b273d9a2380552336f61d96 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 22 Aug 2024 02:24:06 +0200 Subject: Make `RichText` generic over data structure ... and decouple `markdown::parse` from theming --- core/src/padding.rs | 2 +- core/src/text.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/src/padding.rs b/core/src/padding.rs index fdaa0236..e26cdd9b 100644 --- a/core/src/padding.rs +++ b/core/src/padding.rs @@ -32,7 +32,7 @@ use crate::{Pixels, Size}; /// let widget = Widget::new().padding(20); // 20px on all sides /// let widget = Widget::new().padding([10, 20]); // top/bottom, left/right /// ``` -#[derive(Debug, Copy, Clone, Default)] +#[derive(Debug, Copy, Clone, PartialEq, Default)] pub struct Padding { /// Top padding pub top: f32, diff --git a/core/src/text.rs b/core/src/text.rs index 436fee9a..dc8f5785 100644 --- a/core/src/text.rs +++ b/core/src/text.rs @@ -252,7 +252,7 @@ pub struct Span<'a, Link = (), Font = crate::Font> { } /// A text highlight. -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Highlight { /// The [`Background`] of the highlight. pub background: Background, -- cgit