From 0938434c3189c9d906d6474a53aee7781f12dec3 Mon Sep 17 00:00:00 2001 From: Chad Brokaw Date: Fri, 16 Aug 2024 12:49:47 -0400 Subject: [PATCH] no_std --- parley/src/layout/cursor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parley/src/layout/cursor.rs b/parley/src/layout/cursor.rs index c5dca5cf..bc73fd13 100644 --- a/parley/src/layout/cursor.rs +++ b/parley/src/layout/cursor.rs @@ -3,9 +3,9 @@ //! Hit testing. -use peniko::kurbo::Rect; - use super::*; +use alloc::vec::Vec; +use peniko::kurbo::Rect; /// Represents a position within a layout. #[derive(Copy, Clone, PartialEq, Default, Debug)] @@ -421,7 +421,7 @@ impl Selection { } pub fn visual_regions(&self, layout: &Layout) -> Vec { - let mut rects = vec![]; + let mut rects = Vec::new(); self.visual_regions_with(layout, |rect| rects.push(rect)); rects }