Releases: maciejhirsz/beef
Releases · maciejhirsz/beef
0.5.2
- Fix to pointer provenance for owned
Cow<str>
(#47), thanks to @Nilstrieb.
0.5.1
- The
Deserialize
implementation forbeef::Cow<str>
using theimpl_serde
feature is now specialized, and will produced a borrowed variant if possible, which is particularly useful forserde_json
(see #44). const_fn
feature is internally using a narrower unstable feature gateconst_fn_trait_bound
(see #41).- Clarified documentation and doc tests to specify that
beef::lean::Cow
is two words wide on 64-bit architectures only.
0.5.0
0.4.4
0.4.3
0.4.2
const_str
andconst_slice
are now available for bothbeef::Cow
andbeef::lean::Cow
.const_str
no longer requires nightly and is available without a feature flag.
0.4.1
0.4.0
- Fixed a memory leak in
beef::lean::Cow
, found thanks to Miri and @RalfJung. - Added
impl_serde
feature which provides aSerialize
andDeserialize
trait implementations. - Added
is_borrowed
andis_owned
methods. beef::Cow<'a, T>
is now a type alias tobeef::generic::Cow<'a, T, Wide>
whereWide
is private. This doesn't change anything, merely hidesOption<NonZeroUsize>
as implementation detail and makes errors more readable.- Due to internal refactoring,
const_fn
feature now adds two separate functions instead of one:const_str
andconst_slice
for borrowing&'static str
and&'static [T]
respectively. This is the only breaking change this release.
0.3.0
beef::Cow<'a, T>
is now a type alias forbeef::generic::Cow<'a, T, Option<NonZeroUsize>>
.- Added
beef::lean::Cow<'a, T>
which is a type alias forbeef::generic::Cow<'a, T, Lean>
, whereLean
is a 0-sized struct. This version of theCow
stores length and capacity together on a singleusize
, and is only available for 64-bit targets. - Due to generic constraints
const_fn
now addsCow::const_borrowed
as a separate function. This is not available forbeef::lean::Cow
. Beef
trait has been made private.
0.2.1
- Reworked pointer casting in
owned_from_parts
.