diff options
| author | Thalia Archibald <thalia@archibald.dev> | 2025-03-11 17:37:36 -0700 |
|---|---|---|
| committer | Thalia Archibald <thalia@archibald.dev> | 2025-03-11 20:26:10 -0700 |
| commit | 9d379e11a6e9d8b491ce7143600495ae101e8c69 (patch) | |
| tree | 2f9075eaf7945fe612cefd08ff20b6d1cfddd2da /library/core/src/bstr/mod.rs | |
| parent | 3a6d0ae0086baf30df19390700560c5a346dbe0e (diff) | |
| download | rust-9d379e11a6e9d8b491ce7143600495ae101e8c69.tar.gz rust-9d379e11a6e9d8b491ce7143600495ae101e8c69.zip | |
Implement SliceIndex for ByteStr
Diffstat (limited to 'library/core/src/bstr/mod.rs')
| -rw-r--r-- | library/core/src/bstr/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/core/src/bstr/mod.rs b/library/core/src/bstr/mod.rs index c33dd244ad9..c8d0c701ba8 100644 --- a/library/core/src/bstr/mod.rs +++ b/library/core/src/bstr/mod.rs @@ -92,6 +92,13 @@ impl ByteStr { pub fn as_bytes(&self) -> &[u8] { &self.0 } + + #[doc(hidden)] + #[unstable(feature = "bstr_internals", issue = "none")] + #[inline] + pub fn as_bytes_mut(&mut self) -> &mut [u8] { + &mut self.0 + } } #[unstable(feature = "bstr", issue = "134915")] |
