chore(napi): add u64 to BigInt conversion through From trait (#1143)
* Add u64 to BigInt conversion through From trait * Fix lint
This commit is contained in:
parent
454d3b8cab
commit
581e3bbb87
1 changed files with 9 additions and 0 deletions
|
@ -208,3 +208,12 @@ impl ToNapiValue for isize {
|
||||||
Ok(raw_value)
|
Ok(raw_value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<u64> for BigInt {
|
||||||
|
fn from(val: u64) -> Self {
|
||||||
|
BigInt {
|
||||||
|
sign_bit: false,
|
||||||
|
words: vec![val],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue