Skip to content

Releases: maciejhirsz/beef

0.5.2

27 May 09:55
Compare
Choose a tag to compare
  • Fix to pointer provenance for owned Cow<str> (#47), thanks to @Nilstrieb.

0.5.1

22 Jul 11:02
2b617ba
Compare
Choose a tag to compare
  • The Deserialize implementation for beef::Cow<str> using the impl_serde feature is now specialized, and will produced a borrowed variant if possible, which is particularly useful for serde_json (see #44).
  • const_fn feature is internally using a narrower unstable feature gate const_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

26 Jan 21:18
175938a
Compare
Choose a tag to compare
  • Fixed soundness issues around the Sync and Send markers (#37, #38. #39).
  • Added Unpin impl (#39).

0.4.4

02 Jun 13:20
856988b
Compare
Choose a tag to compare
  • Implemented Default on Cow (#32).

0.4.3

22 Apr 12:50
Compare
Choose a tag to compare
  • Added PartialOrd and Ord, and fixed Eq impls (#28, #29).

0.4.2

31 Mar 19:33
9024b24
Compare
Choose a tag to compare
  • const_str and const_slice are now available for both beef::Cow and beef::lean::Cow.
  • const_str no longer requires nightly and is available without a feature flag.

0.4.1

21 Mar 01:48
2ea5747
Compare
Choose a tag to compare

0.4.0

18 Mar 19:23
8c05a0d
Compare
Choose a tag to compare
  • Fixed a memory leak in beef::lean::Cow, found thanks to Miri and @RalfJung.
  • Added impl_serde feature which provides a Serialize and Deserialize trait implementations.
  • Added is_borrowed and is_owned methods.
  • beef::Cow<'a, T> is now a type alias to beef::generic::Cow<'a, T, Wide> where Wide is private. This doesn't change anything, merely hides Option<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 and const_slice for borrowing &'static str and &'static [T] respectively. This is the only breaking change this release.

0.3.0

17 Mar 07:25
c1197ee
Compare
Choose a tag to compare
  • beef::Cow<'a, T> is now a type alias for beef::generic::Cow<'a, T, Option<NonZeroUsize>>.
  • Added beef::lean::Cow<'a, T> which is a type alias for beef::generic::Cow<'a, T, Lean>, where Lean is a 0-sized struct. This version of the Cow stores length and capacity together on a single usize, and is only available for 64-bit targets.
  • Due to generic constraints const_fn now adds Cow::const_borrowed as a separate function. This is not available for beef::lean::Cow.
  • Beef trait has been made private.

0.2.1

14 Mar 22:08
64b7812
Compare
Choose a tag to compare
  • Reworked pointer casting in owned_from_parts.