From 207bafde1fa2468d666c7ac894eebee1cf95bed2 Mon Sep 17 00:00:00 2001 From: Micha White Date: Thu, 21 Dec 2023 16:33:09 -0500 Subject: Engine API --- engine/src/lazysort.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/src/lazysort.rs') diff --git a/engine/src/lazysort.rs b/engine/src/lazysort.rs index e2d6a3f..bec372c 100644 --- a/engine/src/lazysort.rs +++ b/engine/src/lazysort.rs @@ -10,10 +10,10 @@ pub struct LazySortIter R, R: Ord> { index: usize, } -impl R, R: Ord> LazySort { - pub fn new(collection: Box<[T]>, sort_by: F) -> Self { +impl R, R: Ord> LazySort { + pub fn new(collection: &[T], sort_by: F) -> Self { Self { - collection, + collection: collection.into(), sort_by, sorted: 0, } -- cgit v1.2.3