From 6ab30cf1a18c91852f5b1b4400236224d1504177 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 16 Apr 2026 11:45:41 +0100 Subject: [PATCH] exactsizearr: No need for default constraint on items of the ESI input --- src/exactsizearr.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/exactsizearr.rs b/src/exactsizearr.rs index e9891f3..d4d5f21 100644 --- a/src/exactsizearr.rs +++ b/src/exactsizearr.rs @@ -1,10 +1,7 @@ /// An iterator adaptor (derived from ExactSizedIterator) which has a guaranteed /// compile time size, allowing for collection of an iterator into a stack /// allocated array. -pub trait ExactSizedArr: ExactSizeIterator + Sized -where - I: Default, -{ +pub trait ExactSizedArr: ExactSizeIterator + Sized { fn into_array(mut self) -> Result<[Self::Item; N], Self> { if self.len() < N { Err(self) @@ -15,9 +12,4 @@ where } /// Default implementation of ExactSizedArr for any ExactSizeIterator. -impl ExactSizedArr for I -where - T: Default + Copy + Clone, - I: ExactSizeIterator, -{ -} +impl ExactSizedArr for I where I: ExactSizeIterator {}