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

Fix setting expectations on barely-generic functions #272

Merged
merged 2 commits into from
Apr 19, 2021
Merged

Commits on Apr 18, 2021

  1. Declosurefy should delete where clauses where possible.

    If declosurefy removes all of a where clause's predicates, then it
    should remove the whole where clause.  This results in some functions
    will no longer need to use generic Expectations structs.
    asomers committed Apr 18, 2021
    Configuration menu
    Copy the full SHA
    0a7f370 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2021

  1. Fix setting expectations on barely-generic functions.

    If the function's generic parameters appeared in neither input nor
    return type, the Expectations object would not be parameterized on the
    functions generic parameters.  This wasn't really by design; it was
    actually an artifact of Mockall's second incarnation, which used a
    macro_rules! macro to generate the mock objects.
    
    Fixing the problem is easy.  It's a matter of removing the code that
    tried to guess the generic parameters based on the functions arguments
    and return types.
    
    Fixes #269
    asomers committed Apr 19, 2021
    Configuration menu
    Copy the full SHA
    7dbb624 View commit details
    Browse the repository at this point in the history