When verifying multiple parameters, the verification call would look something like check_auth(&e, auth, Domain::Freeze, (a, b).into_val(&e));. One would naturally assume that verification for a single parameter would look like check_auth(&e, auth, Domain::Freeze, (a).into_val(&e));, but that will fail with a ConversionError, because a vector is expected instead of the single value a. The right way to do this would be to use (a,).into_val(&e) (notice the comma) or (vec![&e, a]).into_val(&e).
The error does point you to where the conversion error occurs, but it could take some time for someone to understand what went wrong. Ideally, this issue would be caught at compile time.
When verifying multiple parameters, the verification call would look something like
check_auth(&e, auth, Domain::Freeze, (a, b).into_val(&e));
. One would naturally assume that verification for a single parameter would look likecheck_auth(&e, auth, Domain::Freeze, (a).into_val(&e));
, but that will fail with aConversionError
, because a vector is expected instead of the single valuea
. The right way to do this would be to use(a,).into_val(&e)
(notice the comma) or(vec![&e, a]).into_val(&e)
.The error does point you to where the conversion error occurs, but it could take some time for someone to understand what went wrong. Ideally, this issue would be caught at compile time.