Skip to content

Releases: rust-pretty-assertions/rust-pretty-assertions

v1.4.1

15 Sep 13:10
Compare
Choose a tag to compare

Fixed

  • Show feature-flagged code in documentation. Thanks to @sandydoo for the fix! (#130)

Internal

  • Bump yansi version to 1.x. Thanks to @SergioBenitez for the update, and maintaining this library! (#121)

v1.4.0

06 Jul 18:00
3f1ebc0
Compare
Choose a tag to compare

Changed

  • (Windows only) Removed the ctor and output_vt100 dependencies, as their benefit could not be demonstrated (#118)

Fixed

  • Minor documentation fixes (#107)

v1.3.0

30 Aug 10:55
27ee628
Compare
Choose a tag to compare

Changed

  • MSRV bumped to 1.54.0 (see #102)
  • Removed the publically re-exported ansi_term::Style. This was never intended for public use. (see #102)

Fixed

  • Moved from the unmaintained ansi_term crate to yansi for ANSI terminal escape code support. Thanks to @Roguelazer for reporting and fixing this! (#102, @Roguelazer)

v1.2.1

02 Apr 08:24
4fed8fd
Compare
Choose a tag to compare

Fixed

  • Fixed a panic caused by diffing two str-like values where only the left has a trailing newline - thanks @Michael-F-Bryan for reporting this (#97, @tommilligan)

v1.2.0

02 Apr 08:23
9654759
Compare
Choose a tag to compare

Changed

  • assert_eq compares str-like values without Debug formatting. (#92, @dtolnay)

v1.1.0

01 Feb 10:53
22c55a8
Compare
Choose a tag to compare

Added

  • Add assert_str_eq for comparing two str-like values without Debug formatting. Thanks to @x3ro for implementing this! (#88, @x3ro)

Fixed

v1.0.0

28 Sep 10:58
737c861
Compare
Choose a tag to compare

Note: As pretty_assertions has in practice had a stable API for several years, this feature release takes the opportunity to increment the version to 1.0.0 instead of 0.8.0. No breaking changes are expected.

Removed

  • assert_ne no longer warns if values match using PartialEq but not with Debug. This was noted as no longer being necessary after Rust 1.25 (current MSRV 1.35.0)

Added

  • Officially support no_std (thanks to @Luro02 for the report and reviews!). Adds the std and alloc features to the pretty_assertions crate, with std enabled by default (#83, @tommilligan)
  • Adds the unstable feature to the pretty_assertions crate, for use with nightly rustc (#81, @tommilligan)
  • Add a drop in replacement for the unstable stdlib assert_matches macro, behind the unstable flag - thanks @gilescope for the suggestion! (#81, @tommilligan)

v0.7.2

15 Apr 20:35
da3cf9a
Compare
Choose a tag to compare

Fixed

  • Fix macro hygiene for expansion in a no_implicit_prelude context (#70, @tommilligan)

v0.7.1

09 Mar 00:28
2667441
Compare
Choose a tag to compare

Fixed

  • Fix a bug where multiline changes showed an unhelpful inline diff (#66, @tommilligan)

v0.7.0

09 Mar 00:26
7f6ae17
Compare
Choose a tag to compare

Changed

  • Move from difference to diff for calculating diffs. The exact assertion messages generated may differ from previous versions. (#52, @tommilligan)

For example, the following assertion message from v0.7.0:

pretty assertion

Was previously rendered like this in v0.6.1:

pretty assertion

Added

  • Support for unsized values (#42, @stanislav-tkach)
  • Document the Comparison struct, which was previously hidden. This can be used to generate a pretty diff of two values without panicking. (#52, @tommilligan)

Fixed

Internal