pantonshire c8783caae2 strings: CappedString now uses a MaybeUninit buf
CappedString was previously backed by a `[u8; N]`, which required
zeroing the buffer on creation. It now uses a `[MaybeUninit<u8>; N]`,
which does need to be zeroed. This should improve the performance of
creating a new CappedString, at the cost of slightly more unsafe code
required in its implementation.

Additionally, `as_bytes` and `as_bytes_mut` methods were introduced.
These are primarily used internally in the implementation of
CappedString, but are also provided as part of the public API to allow
users to do low-level operations on the underlying buffer backing the
CappedString. `as_bytes_mut` is unsafe, as this method can be used to
violate the UTF-8 property of the CappedString, which is undefined
behaviour.
2022-09-08 16:20:17 +01:00
2022-05-15 17:14:39 +01:00
2022-05-15 18:32:30 +01:00

libshire

A collection of assorted Rust utilities for reuse between various projects 🦀

S
Description
Assorted utilities
Readme
151 KiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 99.7%
Shell 0.3%