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

Leverage new is_type_of for iterator protocol #1450

Merged
merged 1 commit into from
Apr 12, 2019

Commits on Apr 12, 2019

  1. Leverage new is_type_of for iterator protocol

    Treats any object of shape `{ next: function }` as an iterator via new `is_type_of` method. This is consistent with JavaScript iteration protocol which we already respect.
    
    Also fixes a minor issue that `is_function` was unnecessarily called twice (once explicitly and once as part of `dyn_into` which now does the same check).
    RReverser committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    2f524ee View commit details
    Browse the repository at this point in the history