c8783caae20cb580ddfa35cde52a4696de2ecf87
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.
libshire
A collection of assorted Rust utilities for reuse between various projects 🦀
Languages
Rust
99.7%
Shell
0.3%