]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #81409 - gilescope:chars_count, r=joshtriplett
authorYuki Okushi <huyuumi.dev@gmail.com>
Sat, 30 Jan 2021 04:36:48 +0000 (13:36 +0900)
committerGitHub <noreply@github.com>
Sat, 30 Jan 2021 04:36:48 +0000 (13:36 +0900)
commitc26dd4d4140202283221c05758b1b1531b2fbb96
treec4a8d8ef3ee93f46e038f003775cd7da268d098d
parent7fa991fb8545d8b03f0ab953770cb4fa08921abc
parenta623ea5301737507a8229c2ddae74b20f727bd1b
Rollup merge of #81409 - gilescope:chars_count, r=joshtriplett

Slight simplification of chars().count()

Slight simplification: No need to call len(), we can just count the number of non continuation bytes.

I can't see any reason not to do this, can you?