RS.CLIPPY.BIG_ENDIAN_BYTES

Disallows usage of the `to_be_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: big_endian_bytes. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for the usage of the to_be_bytes method and/or the function from_be_bytes.

Why restrict this?

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

Example

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