Skip to content

Commit 875cbbe

Browse files
committed
[nit] Remove trait bound af::HasEnum on struct definition and Drop impl for Array<T>
1 parent 5a4f4f4 commit 875cbbe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/core/array.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ extern "C" {
160160
/// All operators(traits) from std::ops module implemented for Array object
161161
/// carry out element wise operations. For example, `*` does multiplication of
162162
/// elements at corresponding locations in two different Arrays.
163-
pub struct Array<T: HasAfEnum> {
163+
pub struct Array<T> {
164164
handle: af_array,
165165
/// The phantom marker denotes the
166166
/// allocation of data on compute device
@@ -701,10 +701,7 @@ where
701701
}
702702

703703
/// To free resources when Array goes out of scope
704-
impl<T> Drop for Array<T>
705-
where
706-
T: HasAfEnum,
707-
{
704+
impl<T> Drop for Array<T> {
708705
fn drop(&mut self) {
709706
unsafe {
710707
let ret_val = af_release_array(self.handle);

0 commit comments

Comments
 (0)