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

Check record size before Scope::unbind2. #130

Merged
merged 2 commits into from
Sep 5, 2018

Conversation

boomshroom
Copy link
Contributor

Fixes #129.

Ideally, moniker should change Scope::unbind2 to return a Result. The next best thing to hope for from them is a convenient way to check the number of bindings in a Scope.

span: ByteSpan,
found_size: u64,
expected_size: u64,
},
Copy link
Member

Choose a reason for hiding this comment

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

We could perhaps do this to produce some better errors:

    RecordFieldMismatch {
        span: ByteSpan,
        found_labels: Vec<Label>,
        expected_labels: Vec<Label>,
    },

But I don't mind making a new issue, seeing as this PR fixes the immediate bug!

@brendanzab brendanzab merged commit 2ceac7f into pikelet-lang:master Sep 5, 2018
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.

2 participants