Skip to content

redundant_into

Default: Enabled

Source Code

What it does

Detects redundant calls to into() or try_into() where the input and output types are the same, i.e., the conversion is a no-op and can be removed.

Example

cairo
fn f(x: u128) -> u128 {
    // redundant - `x` is already an u128
    x.into()
}