Skip to content

Remove redundant check in Reflect::downcast method #5120

Description

@alice-i-cecile

When attempting to downcast to a type, we check if the type is correct here. However, the Any::downcast method used inside this call does this anyways.

We should remove this check, and then match on the returned Result from the Any version.

Spotted by @cart in #5010 here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ReflectionRuntime information about typesC-Code-QualityA section of code that is hard to understand or change

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions