Rust

Rust

Made by DeepSource

Found redundant transmute between the type T and T RS-W1117

Anti-pattern
Minor

Transmutes to the original type of the object is redundant. Such code creates the illusion of complexity and reduces readability.

Bad practice

fn foo(x: u8) -> u8 {
    // where the result type is the same as `x`'s
    core::intrinsics::transmute(x)
}

Recommended

fn foo(x: u8) -> u8 {
    x
}