Skip to content

Commit f5c18a5

Browse files
authored
Merge pull request #1021 from jturner314/impl-from-Array-for-ArcArray
Implement From<Array<A, D>> for ArcArray<A, D>
2 parents 6faac1e + 0d9d382 commit f5c18a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/arraytraits.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,15 @@ where
354354
}
355355
}
356356

357+
impl<A, D> From<Array<A, D>> for ArcArray<A, D>
358+
where
359+
D: Dimension,
360+
{
361+
fn from(arr: Array<A, D>) -> ArcArray<A, D> {
362+
arr.into_shared()
363+
}
364+
}
365+
357366
/// Argument conversion into an array view
358367
///
359368
/// The trait is parameterized over `A`, the element type, and `D`, the

0 commit comments

Comments
 (0)