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: use Result type aliases in "Wrap return type in Result" assist #18016

Merged

Commits on Sep 2, 2024

  1. fix: use Result type aliases in "Wrap return type in Result" assist

    This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library
    type when the are in scope, use at least one generic parameter, and have the name "Result".
    
    The last restriction was made in an attempt to avoid false assumptions about which type the
    user is referring to, but that might be overly strict. We could also do something like this, in
    order of priority:
    
    * Use the alias named "Result".
    * Use any alias if only a single one is in scope, otherwise:
    * Use the standard library type.
    
    This is easy to add if others feel differently that is appropriate, just let me know.
    IvarWithoutBones committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    4e9d17b View commit details
    Browse the repository at this point in the history