Assorted utilities
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
pantonshire 82034e14d0 strings: pointer-to-reference functions for InliningString
Previously, several functions in the implementation of `InliningString`
converted raw pointers to references as part of large blocks of code,
either via deref coercion or via `slice::from_raw_parts`. This created a
risk of Rust inferring reference lifetimes that were too long; this is
bad because it could result in a use-after-free or mutable aliasing.
This patch moves pointer-to-reference conversions in `InliningString` to
dedicated helper functions with explicit or easily-elided lifetimes to
avoid this issue.

This patch also introduces a
`InliningString::take_boxed_buf_invalidating` method, which provides a
way to move the boxed buffer out of an `InliningString` without aliasing
the box's heap allocation (which is not allowed). The `Drop`
implementation is reworked to use this method, as well as
`InliningString::into_boxed_str`.
3 years ago
src strings: pointer-to-reference functions for InliningString 3 years ago
.gitignore Initial commit 4 years ago
Cargo.toml RFC 3986 percent encoding, std feature now depends on alloc feature 3 years ago
README.md Create README.md 4 years ago
test.sh test: improve test script to allow easily adding new runs 3 years ago

README.md

libshire

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