ruff
f73bb45b - [ty] Rename Type unwrapping methods (#20857)

Commit
349 days ago
[ty] Rename Type unwrapping methods (#20857) ## Summary Rename "unwrapping" methods on `Type` from e.g. `Type::into_class_literal` to `Type::as_class_literal`. I personally find that name more intuitive, since no transformation of any kind is happening. We are just unwrapping from certain enum variants. An alternative would be `try_as_class_literal`, which would follow the [`strum` naming scheme](https://docs.rs/strum/latest/strum/derive.EnumTryAs.html), but is slightly longer. Also rename `Type::into_callable` to `Type::try_upcast_to_callable`. Note that I intentionally kept names like `FunctionType::into_callable_type`, because those return `CallableType`, not `Option<Type<…>>`. ## Test Plan Pure refactoring
Author
Parents
Loading