Skip to content

Commit da463b3

Browse files
use inherent from traits
1 parent dbafac4 commit da463b3

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

wasm/src/types/field.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ impl Field {
9090
Field(self.0)
9191
}
9292

93-
/// Returns a reference to the inner native Field representation.
94-
/// Useful when calling Rust functions that operate on FieldNative directly.
95-
pub(crate) fn as_native(&self) -> &FieldNative {
96-
&self.0
97-
}
98-
9993
/// Generate a random field element.
10094
pub fn random() -> Field {
10195
let rng = &mut rand::thread_rng();

wasm/src/types/integer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ macro_rules! impl_integer {
181181
/// Convert from Field.
182182
#[wasm_bindgen(js_name = "fromField")]
183183
pub fn from_field(field: &crate::Field) -> Result<$name, String> {
184-
<$native>::from_field(field.as_native()).map(Self).map_err(|e| e.to_string())
184+
<$native>::from_field(&FieldNative::from(field))
185+
.map(Self)
186+
.map_err(|e| e.to_string())
185187
}
186188

187189
/// Convert from Fields.

0 commit comments

Comments
 (0)