You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ion-schema-rust should implement a similar approach as what is described here:
🗺️ IonFailure (imported above on line 5) is a new crate-visible trait that provides extension methods for the IonResult and IonError types.
Previously, each IonError variant had one helper function in crate::result that would build an IonResult, and an accompanying function that would being an IonError. The names got pretty weird. For example, decoding_error would return an IonResult (not an error, as one could reasonably infer), and decoding_error_raw would return an IonError. (The "raw" indicated that it hadn't gone through the final step of wrapping the IonError in a Result::Err, which was not an obvious connection.)
The IonFailure trait replaces those method pairs. Now you can use IonResult::decoding_error to make an IonResult and you can use IonError::decoding_error to make an IonError. Much more straightforward.
ion-schema-rust
should implement a similar approach as what is described here:Originally posted by @zslayton in amazon-ion/ion-rust#584 (comment)
The text was updated successfully, but these errors were encountered: