RS.CLIPPY.TRIM_SPLIT_WHITESPACE
Using `str::trim()` or alike before `str::split_whitespace`
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: trim_split_whitespace. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Warns about calling str::trim (or variants) before str::split_whitespace.
Why is this bad?
split_whitespace already ignores leading and trailing whitespace.
Example
" A B C ".trim().split_whitespace();
Use instead:
" A B C ".split_whitespace();