str::bytes().count()
is longer and may not be as performant as using str::len()
.
Apply with the Grit CLI
grit apply byte_count_to_len
Replaces a simple str::bytes().count()
BEFORE
let my_len = "hello".bytes().count();
AFTER
let my_len = "hello".len();