Skip to content

Commit dbfe525

Browse files
glyhdannywillems
authored andcommitted
port poseidon sponge to ocaml-rs.1.3.0
1 parent e2d058a commit dbfe525

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

poseidon/src/sponge.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,12 @@ pub mod caml {
275275
// ScalarChallenge<F> <-> CamlScalarChallenge<CamlF>
276276
//
277277

278-
#[derive(Debug, Clone, ocaml::IntoValue, ocaml::FromValue, ocaml_gen::Struct)]
279-
pub struct CamlScalarChallenge<CamlF>(pub CamlF);
278+
#[derive(Debug, Clone, ocaml::ToValue, ocaml::FromValue, ocaml_gen::Struct)]
279+
pub struct CamlScalarChallenge<CamlF: ocaml::ToValue + ocaml::FromValue>(pub CamlF);
280280

281281
impl<F, CamlF> From<ScalarChallenge<F>> for CamlScalarChallenge<CamlF>
282282
where
283-
CamlF: From<F>,
283+
CamlF: From<F> + ocaml::ToValue + ocaml::FromValue,
284284
{
285285
fn from(sc: ScalarChallenge<F>) -> Self {
286286
Self(sc.0.into())
@@ -289,7 +289,7 @@ pub mod caml {
289289

290290
impl<F, CamlF> From<CamlScalarChallenge<CamlF>> for ScalarChallenge<F>
291291
where
292-
CamlF: Into<F>,
292+
CamlF: Into<F> + ocaml::ToValue + ocaml::FromValue,
293293
{
294294
fn from(caml_sc: CamlScalarChallenge<CamlF>) -> Self {
295295
Self(caml_sc.0.into())

0 commit comments

Comments
 (0)