Skip to content

Commit

Permalink
Merge pull request #1021 from jturner314/impl-from-Array-for-ArcArray
Browse files Browse the repository at this point in the history
Implement From<Array<A, D>> for ArcArray<A, D>
  • Loading branch information
bluss committed Jun 5, 2021
2 parents 6faac1e + 0d9d382 commit f5c18a5
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 f5c18a5

Please sign in to comment.