Skip to content

Remove redundant check in Reflect::downcast method #5120

@alice-i-cecile

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.

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

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions