Commit Graph

14 Commits

Author SHA1 Message Date
Mark Rousskov
efe54e24aa Substitute version placeholders 2023-11-15 19:40:51 -05:00
Colin Finck
60fd119a29
Implement FusedIterator for DecodeUtf16 when the inner iterator does 2023-04-24 13:34:36 +02:00
Lukas Markeffsky
76e216f29b Use associated items of char instead of freestanding items in core::char 2023-01-14 11:58:41 +01:00
Michal Nazarewicz
28162ad970 char: µoptimise UTF-16 surrogates decoding
According to Godbolt¹, on x86_64 using binary and produces slightly
better code than using subtraction.  Readability of both is pretty
much equivalent so might just as well use the shorter option.

¹ https://rust.godbolt.org/z/9jM3ejbMx
2022-12-23 14:15:33 +01:00
Pietro Albini
3975d55d98
remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
Jane Losare-Lusby
bf7611d55e Move error trait into core 2022-08-22 13:28:25 -07:00
Eduardo Sánchez Muñoz
a8ff1aead8 Avoid duplication of doc comments in std::char constants and functions.
For those consts and functions, only the summary is kept and a reference to the `char` associated const/method is included.

Additionaly, re-exported functions have been converted to function definitions that call the previously re-exported function. This makes it easier to add a deprecated attribute to these functions in the future.
2022-04-01 18:36:53 +02:00
ltdk
d5803678c1 Add u16::is_utf16_surrogate 2022-03-21 22:51:32 -04:00
Maybe Waffle
17cd2cd592 Fix an edge case in chat::DecodeUtf16::size_hint
There are cases, when data in the buf might or might not be an error.
2022-01-30 15:32:21 +03:00
Maybe Waffle
2c97d1012e Fix wrong assumption in DecodeUtf16::size_hint
`self.buf` can contain a surrogate, but only a leading one.
2022-01-28 12:40:59 +03:00
Maybe Waffle
cd4245d318 Make char::DecodeUtf16::size_hist more precise
New implementation takes into account contents of `self.buf` and rounds
lower bound up instead of down.
2022-01-27 00:30:33 +03:00
John Kugelman
68b0d86294 Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
Guillaume Gomez
cf0f5021f4 Add missing links for core::char types 2021-07-29 14:13:41 +02:00
mark
2c31b45ae8 mv std libs to library/ 2020-07-27 19:51:13 -05:00