8

Github Make char and u8 methods const by lopopolo · Pull Request #82078 · rust-l...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/82078
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.

Copy link

Contributor

lopopolo commented 29 days ago

edited

char methods len_utf8, len_utf16, to_ascii_lowercase, eq_ignore_ascii_case can be made const.

u8 methods to_ascii_lowercase, to_ascii_uppercase are required to be const as well.

u8::eq_ignore_ascii_case was additionally made const.

Rebase of #79549 originally authored by @YenForYang. Changes from that PR:

  • Squashed all commits from #79549.
  • rebased to latest upstream master.
  • Removed const attributes for char::escape_unicode and char::escape_default.
  • Updated since attributes for const stabilization to 1.52.0.

cc @m-ou-se.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK