Matthias Krüger
08d5b2303a
Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi
...
Implement `ByteStr` and `ByteString` types
Approved ACP: https://github.com/rust-lang/libs-team/issues/502
Tracking issue: https://github.com/rust-lang/rust/issues/134915
These types represent human-readable strings that are conventionally,
but not always, UTF-8. The `Debug` impl prints non-UTF-8 bytes using
escape sequences, and the `Display` impl uses the Unicode replacement
character.
This is a minimal implementation of these types and associated trait
impls. It does not add any helper methods to other types such as `[u8]`
or `Vec<u8>`.
I've omitted a few implementations of `AsRef`, `AsMut`, and `Borrow`,
when those would be the second implementation for a type (counting the
`T` impl), to avoid potential inference failures. We can attempt to add
more impls later in standalone commits, and run them through crater.
In addition to the `bstr` feature, I've added a `bstr_internals` feature
for APIs provided by `core` for use by `alloc` but not currently
intended for stabilization.
This API and its implementation are based *heavily* on the `bstr` crate
by Andrew Gallant (`@BurntSushi).`
r? `@BurntSushi`
2025-01-23 19:54:23 +01:00
..
2025-01-04 11:41:51 +01:00
2025-01-11 01:10:29 +00:00
2025-01-07 16:04:14 +01:00
2024-12-23 22:15:32 +00:00
2024-12-27 19:58:16 +11:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-27 19:58:16 +11:00
2024-11-24 03:32:11 +00:00
2024-11-24 03:32:11 +00:00
2024-11-24 03:32:11 +00:00
2024-12-27 19:58:16 +11:00
2024-12-04 20:29:35 +00:00
2024-12-27 19:58:16 +11:00
2024-11-24 03:32:11 +00:00
2024-11-24 03:32:11 +00:00
2025-01-15 09:21:51 +01:00
2025-01-15 09:21:51 +01:00
2024-11-26 02:50:48 +08:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-02 20:55:45 -07:00
2024-12-02 20:55:45 -07:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-12-02 18:43:37 +01:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-12-23 22:15:32 +00:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-12-09 15:17:26 +01:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2024-11-23 08:57:25 -07:00
2025-01-18 08:51:28 +01:00
2025-01-18 08:51:28 +01:00
2024-12-02 20:18:25 +01:00
2024-12-02 20:18:25 +01:00
2024-12-02 20:18:25 +01:00
2024-11-26 02:50:48 +08:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-11-22 02:32:26 +00:00
2024-12-10 00:38:05 +00:00
2024-12-09 15:17:26 +01:00
2024-11-26 02:50:48 +08:00
2025-01-04 11:41:51 +01:00
2025-01-18 21:15:37 +00:00
2024-11-26 02:50:48 +08:00
2024-11-26 02:50:48 +08:00
2024-12-01 05:11:42 +00:00
2024-12-07 21:29:58 +00:00
2024-12-27 19:58:16 +11:00
2024-12-27 19:58:16 +11:00
2024-11-22 16:54:40 +00:00
2024-12-26 19:21:43 +00:00
2024-12-26 19:21:43 +00:00
2024-11-22 17:01:02 +00:00
2025-01-08 18:14:58 +00:00
2024-12-04 20:29:35 +00:00
2024-11-26 02:50:48 +08:00
2024-12-23 22:15:32 +00:00
2024-12-27 19:58:16 +11:00
2024-12-27 12:42:07 +11:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-11-28 12:22:02 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-09 15:17:26 +01:00
2025-01-18 22:09:35 +00:00
2024-12-04 20:49:05 +00:00
2024-12-04 20:49:05 +00:00
2024-12-04 20:29:35 +00:00
2024-12-04 20:29:35 +00:00
2024-12-04 20:49:05 +00:00
2024-12-04 20:49:05 +00:00
2024-12-04 20:29:35 +00:00
2024-12-04 20:29:36 +00:00
2024-12-04 20:29:36 +00:00
2024-12-25 10:36:32 +01:00
2025-01-15 09:21:51 +01:00
2025-01-15 09:21:51 +01:00
2025-01-02 23:39:16 +00:00
2025-01-02 23:39:17 +00:00
2024-12-27 19:58:16 +11:00
2024-12-04 20:29:36 +00:00
2024-12-04 20:29:36 +00:00
2024-12-23 22:15:32 +00:00
2024-12-23 22:15:32 +00:00
2024-12-09 15:17:26 +01:00
2024-12-04 20:29:35 +00:00
2024-12-04 20:29:35 +00:00
2024-11-30 10:42:17 +01:00
2024-12-23 16:24:45 +01:00
2024-12-27 19:58:16 +11:00
2024-12-27 19:58:16 +11:00
2024-12-27 19:58:16 +11:00
2024-11-22 16:54:40 +00:00
2025-01-14 19:12:08 +00:00
2025-01-14 19:12:08 +00:00
2024-12-01 19:52:27 +01:00
2024-12-01 19:52:27 +01:00
2024-12-01 19:52:27 +01:00
2025-01-14 19:12:08 +00:00
2024-11-25 17:27:41 +00:00
2024-12-09 15:17:26 +01:00
2024-12-09 15:17:26 +01:00
2024-12-25 10:36:32 +01:00
2024-12-25 10:36:32 +01:00
2025-01-06 17:54:59 +01:00
2025-01-06 17:54:59 +01:00
2025-01-08 20:04:24 +01:00
2025-01-08 20:04:24 +01:00
2024-12-10 00:38:05 +00:00
2024-11-27 03:34:58 +00:00
2025-01-11 06:35:21 +02:00
2024-12-04 20:29:35 +00:00
2024-12-04 20:29:35 +00:00
2024-11-22 02:32:26 +00:00
2024-12-01 19:52:27 +01:00
2024-12-01 19:52:27 +01:00
2024-12-10 00:38:05 +00:00
2024-12-27 19:58:16 +11:00