6
`fmt::Formatter::pad`: don't call chars().count() more than one time by klensy ·...
source link: https://github.com/rust-lang/rust/pull/88560
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
First commit merges two branches of match to call chars().count() only once: that should be faster if this method hits place of 3rd (previous) branch, plus quarter shorter.
Second commit fixes some clippy lints while i'm here (should it be separate PR?).
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK