File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 22// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
44use vortex_buffer:: Buffer ;
5- use vortex_dtype:: NativePType ;
65use vortex_dtype:: UnsignedPType ;
76
87use crate :: take:: Take ;
98
10- impl < T : NativePType , I : UnsignedPType > Take < [ I ] > for & Buffer < T > {
9+ impl < T : Copy , I : UnsignedPType > Take < [ I ] > for & Buffer < T > {
1110 type Output = Buffer < T > ;
1211
1312 fn take ( self , indices : & [ I ] ) -> Buffer < T > {
Original file line number Diff line number Diff line change 44//! Take function implementations on slices.
55
66use vortex_buffer:: Buffer ;
7- use vortex_dtype:: NativePType ;
87use vortex_dtype:: UnsignedPType ;
98
109use crate :: take:: Take ;
@@ -13,7 +12,7 @@ pub mod avx2;
1312pub mod portable;
1413
1514/// Specialized implementation for non-nullable indices.
16- impl < T : NativePType , I : UnsignedPType > Take < [ I ] > for & [ T ] {
15+ impl < T : Copy , I : UnsignedPType > Take < [ I ] > for & [ T ] {
1716 type Output = Buffer < T > ;
1817
1918 fn take ( self , indices : & [ I ] ) -> Buffer < T > {
@@ -40,6 +39,6 @@ impl<T: NativePType, I: UnsignedPType> Take<[I]> for &[T] {
4039 reason = "Compiler may see this as unused based on enabled features"
4140) ]
4241#[ inline]
43- fn take_scalar < T : NativePType , I : UnsignedPType > ( buffer : & [ T ] , indices : & [ I ] ) -> Buffer < T > {
42+ fn take_scalar < T : Copy , I : UnsignedPType > ( buffer : & [ T ] , indices : & [ I ] ) -> Buffer < T > {
4443 indices. iter ( ) . map ( |idx| buffer[ idx. as_ ( ) ] ) . collect ( )
4544}
You can’t perform that action at this time.
0 commit comments