Skip to content

Commit 50d5af6

Browse files
committed
impl From<&Big[U]Int> for Big[U]Int
1 parent 125fbbd commit 50d5af6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/bigint.rs

+7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ impl Clone for BigInt {
8282
}
8383
}
8484

85+
impl From<&BigInt> for BigInt {
86+
#[inline]
87+
fn from(value: &BigInt) -> Self {
88+
value.clone()
89+
}
90+
}
91+
8592
impl hash::Hash for BigInt {
8693
#[inline]
8794
fn hash<H: hash::Hasher>(&self, state: &mut H) {

src/biguint.rs

+7
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ impl Clone for BigUint {
5555
}
5656
}
5757

58+
impl From<&BigUint> for BigUint {
59+
#[inline]
60+
fn from(value: &BigUint) -> Self {
61+
value.clone()
62+
}
63+
}
64+
5865
impl hash::Hash for BigUint {
5966
#[inline]
6067
fn hash<H: hash::Hasher>(&self, state: &mut H) {

0 commit comments

Comments
 (0)