From 04c96f39c5abdb7a5a4f1c0641e17c121d64b051 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 30 Nov 2023 12:59:49 -0700 Subject: [PATCH] Allow Clone of layout structs --- src/layout.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 66513ae3f3..382522624a 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -8,7 +8,7 @@ use alloc::vec::Vec; use crate::{CacheKey, Color}; /// A laid out glyph -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct LayoutGlyph { /// Start index of cluster in original line pub start: usize, @@ -52,7 +52,7 @@ pub struct LayoutGlyph { pub metadata: usize, } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct PhysicalGlyph { /// Cache key, see [CacheKey] pub cache_key: CacheKey, @@ -82,7 +82,7 @@ impl LayoutGlyph { } /// A line of laid out glyphs -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct LayoutLine { /// Width of the line pub w: f32,