Skip to content

Commit 254a871

Browse files
remove scalar from_native
1 parent c1621c7 commit 254a871

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

wasm/src/types/integer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ macro_rules! impl_integer {
155155
/// Convert to Scalar.
156156
#[wasm_bindgen(js_name = "toScalar")]
157157
pub fn to_scalar(&self) -> crate::Scalar {
158-
crate::Scalar::from_native(self.0.to_scalar())
158+
self.0.to_scalar().into()
159159
}
160160

161161
/// Convert from Field.

wasm/src/types/scalar.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ impl Scalar {
4747
self.0.to_string()
4848
}
4949

50-
/// Constructs a Scalar from its native representation that can be exposed to JavaScript.
51-
pub(crate) fn from_native(native: ScalarNative) -> Self {
52-
Scalar(native)
53-
}
54-
5550
/// Create a scalar element from a Uint8Array of left endian bytes.
5651
#[wasm_bindgen(js_name = "fromBytesLe")]
5752
pub fn from_bytes_le(bytes: &Uint8Array) -> Result<Scalar, String> {

0 commit comments

Comments
 (0)