Use split_once to simplify the code.
Use split_once to simplify the code.

Co-authored-by: Jacob Pratt <f862f167b85d41b225785c70d70808bc7337c1fe@jhpratt.dev>
rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io