Rust

Rust

Made by DeepSource

Found potentially ambiguous use of .splitn(..) RS-W1047

Anti-pattern
Minor
Autofix

Prefer using .split(..) over .splitn(..) when possible, to reduce code complexity. .splitn(..).next() is equivalent to .split(..).next().

Replace the call to .splitn(..).next() with .split(..).next().

Bad practice

"Mary had a little lambda".splitn(2, ' ').next();

Recommended

"Mary had a little lambda".split(' ').next();