From cd4eb4cf2fa3aeaf93216f54b8b1961a7ca51f98 Mon Sep 17 00:00:00 2001 From: Adam Kern Date: Sun, 2 Nov 2025 16:19:37 -0500 Subject: [PATCH 1/2] Document + ?Sized in a few more places --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9f2c53d79..ff2c3fcf3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1353,7 +1353,7 @@ impl ArrayPartsSized /// use ndarray::{LayoutRef2, array}; /// /// fn aspect_ratio(layout: &T) -> (usize, usize) -/// where T: AsRef> +/// where T: AsRef> + ?Sized /// { /// let layout = layout.as_ref(); /// (layout.ncols(), layout.nrows()) @@ -1373,14 +1373,14 @@ impl ArrayPartsSized /// /// trait Ratioable { /// fn aspect_ratio(&self) -> (usize, usize) -/// where Self: AsRef>; +/// where Self: AsRef> + ?Sized; /// /// fn cut_to_ratio(&mut self, ratio: (usize, usize)) -/// where Self: AsMut>; +/// where Self: AsMut> + ?Sized; /// } /// /// impl Ratioable for T -/// where T: AsRef> + AsMut> +/// where T: AsRef> + AsMut> + ?Sized /// { /// fn aspect_ratio(&self) -> (usize, usize) /// { From 52e557a6e76d81f49b8a8a12b40f2c777cf84c5c Mon Sep 17 00:00:00 2001 From: Adam Kern Date: Sun, 2 Nov 2025 16:49:32 -0500 Subject: [PATCH 2/2] Remove relaxed bounds on methods --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ff2c3fcf3..a2c1ce8bd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1373,10 +1373,10 @@ impl ArrayPartsSized /// /// trait Ratioable { /// fn aspect_ratio(&self) -> (usize, usize) -/// where Self: AsRef> + ?Sized; +/// where Self: AsRef>; /// /// fn cut_to_ratio(&mut self, ratio: (usize, usize)) -/// where Self: AsMut> + ?Sized; +/// where Self: AsMut>; /// } /// /// impl Ratioable for T