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

It seems Position is not publicly nameable #809

Open
jpschorr opened this issue Aug 12, 2024 · 0 comments
Open

It seems Position is not publicly nameable #809

jpschorr opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jpschorr
Copy link
Contributor

It seems Position is not publicly accessible: https://github.com/amazon-ion/ion-rust/blob/main/src/lib.rs#L181

Using

ion-rs = { version = "1.0.0-rc.6", features = ["experimental"] }

Given an IonError, err:

This works:

        let position: Option<_> = match err {
            IonError::Incomplete(e) => Some(e.position()),
            IonError::Decoding(e) => e.position(),
            _ => None,
        };

But there is no way to explicitly name the type for the position variable, because I can’t actually import the Position type

        let position: Option<&Position> = ...
286 |         let position: Option<&Position> = match &self.0 {
    |                               ^^^^^^^^ not found in this scope
@jpschorr jpschorr added the bug Something isn't working label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant