Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove {Try}FromVal #815

Closed
wants to merge 4 commits into from
Closed

Remove {Try}FromVal #815

wants to merge 4 commits into from

Conversation

jayz22
Copy link
Contributor

@jayz22 jayz22 commented Jan 4, 2023

What

This is the sdk side changes necessary for stellar/rs-soroban-env#623 which is a rebased version of stellar/rs-soroban-env#600.

This won't work because it relies on the conversion between a Result and RawVal, which is commented out in https://github.com/jayz22/rs-soroban-env/blob/aae7e792518ccd3f086586263263944ccf3d6e4c/soroban-env-common/src/lib.rs#L51-L54 due to the infinite recursion issue.

Why

[TODO: Why this change is being made. Include any context required to understand the why.]

Known limitations

[TODO or N/A]

V: IntoVal<Env, RawVal> + TryFromVal<Env, RawVal> + Clone,
V::Error: Debug,
K: IntoVal<Env, RawVal> + Clone,
<RawVal as TryIntoVal<Env, K>>::Error: Debug,
Copy link
Contributor Author

@jayz22 jayz22 Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like how every T::Error now have to be expressed as
<RawVal as TryIntoVal<Env, K>>::Error, not sure if Rust allows a better way to define this type for an entire struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need something like the inherent associated type.

@jayz22 jayz22 requested a review from graydon January 4, 2023 22:03
@jayz22 jayz22 closed this Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant