RS.CLIPPY.BYTE_CHAR_SLICES

Hard to read byte char slice

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

What it does

Checks for hard to read slices of byte characters, that could be more easily expressed as a byte string.

Why is this bad?

Potentially makes the string harder to read.

Example

&[b\'H\', b\'e\', b\'l\', b\'l\', b\'o\'];

Use instead:

b"Hello"