Skip to content

Releases: thomcc/rust-more-asserts

v0.3.1

01 Oct 08:37
v0.3.1
Compare
Choose a tag to compare

This release has no changes to the code, but adds other license options, since CC0 is becoming a problem.

This re-licenses so that it's quad-licensed under whatever you prefer of: Unlicense, CC0, MIT, or Apache2, since surely at least one of these is acceptable.

Yes, this is overkill, I just don't want to have to deal with it again.

v0.3.0

03 Jun 09:58
v0.3.0
a1e66e5
Compare
Choose a tag to compare

Version 0.3.0

Improvements

The internals of this crate have been rewritten and modernized to avoid a few problems in the previous implementation. Please file bugs if you notice issues.

  • The macros now properly reference things using $crate::, so that they may be called as more_asserts::some_macro! without first pulling them into scope with use.

  • The documentation has been overhauled. Rather than suggesting #[macro_use] extern crate more_asserts;, we now suggest a pattern of importing with use more_asserts as ma; and invoking as ma::assert_gt! and similar.

    Of course, pulling the macros in via #[macro_use] extern crate more_asserts; will still work.

  • The macros now are implemented by calling outlined #[track_caller] functions to perform formatting and invoke the panic rather than directly panicking inside the macro body.

    This reduces the amount of code bloat produced by calls to the macros, and can improve the success-path performance of code which uses the macros (generally by allowing the compiler to inline functions that it would otherwise consider too large).

    In pathological cases, it may improve compile time as well.

Breaking changes

Due to the use of #[track_caller], this release increases the MSRV (the required version of the Rust compiler) to 1.46.0. This is the only breaking change.

1.46.0 is several years old now (even Debian stable has it), so hopefully1 this is fine.

  1. If it is not, let me know (file an issue), and I can consider doing compiler version detection in a build script, but I would rather not do this.