add missing Scalar::from_i128

This commit is contained in:
Ralf Jung 2024-06-08 14:48:32 +02:00
parent 655600c5cb
commit e26e42fabe

View File

@ -196,6 +196,11 @@ pub fn from_i64(i: i64) -> Self {
Self::from_int(i, Size::from_bits(64))
}
#[inline]
pub fn from_i128(i: i128) -> Self {
Self::from_int(i, Size::from_bits(128))
}
#[inline]
pub fn from_target_isize(i: i64, cx: &impl HasDataLayout) -> Self {
Self::from_int(i, cx.data_layout().pointer_size)