RS.CLIPPY.LITTLE_ENDIAN_BYTES

Disallows usage of the `to_le_bytes` method

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: little_endian_bytes. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for the usage of the to_le_bytes method and/or the function from_le_bytes.

Why restrict this?

To ensure use of big-endian or the target's endianness rather than little-endian.

Example

let _x = 2i32.to_le_bytes();
let _y = 2i64.to_le_bytes();