Skip to content

Commit

Permalink
Implement From<Array<A, D>> for ArcArray<A, D>
Browse files Browse the repository at this point in the history
  • Loading branch information
jturner314 committed Jun 1, 2021
1 parent e7600e8 commit 0d9d382
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/arraytraits.rs
Expand Up @@ -354,6 +354,15 @@ where
}
}

impl<A, D> From<Array<A, D>> for ArcArray<A, D>
where
D: Dimension,
{
fn from(arr: Array<A, D>) -> ArcArray<A, D> {
arr.into_shared()
}
}

/// Argument conversion into an array view
///
/// The trait is parameterized over `A`, the element type, and `D`, the
Expand Down

0 comments on commit 0d9d382

Please sign in to comment.