Permalink
Browse files

Cut the 0.5.0 release!

  • Loading branch information...
ErichDonGubler committed Mar 6, 2018
1 parent e218894 commit 38e34b0f446956ef9c962cf4d54925bb504d77ba
Showing with 41 additions and 2 deletions.
  1. +40 −1 CHANGELOG.md
  2. +1 −1 Cargo.toml
View
@@ -6,6 +6,43 @@ This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
.
## [0.5.0] - 2018-03-06
### Added
* `contract!` invocations now accept a top-level `double-check` block, which
facilitates the use case where you want to make sure a `struct`'s
invariants are held across a certain set of methods:
```rust
struct Counter {
count: u32,
max: u32,
}
impl Counter {
contract! {
double_check {
assert!(self.count <= self.max);
}
fn tick_up(&mut self) {
body {
// Force a panic if this overflows, even in release
self.count = self.count.checked_add(1).unwrap();
}
}
fn tick_down(&mut self) {
body {
// Force a panic if this underflows, even in release
self.count = self.count.checked_sub(1).unwrap();
}
}
}
}
```
## [0.4.0] - 2017-09-27
### Changes
@@ -157,6 +194,8 @@ come over the course of the next month as time allows.
made by @brson, which lets you include tests in Markdown documents like the
examples in the README written in this release.
[Unreleased]: https://github.com/erichdongubler/adhesion-rs/compare/v0.3.0...master
[Unreleased]: https://github.com/erichdongubler/adhesion-rs/compare/v0.5.0...master
[0.5.0]: https://github.com/erichdongubler/adhesion-rs/compare/v0.4.0...v0.5.0
[0.4.0]: https://github.com/erichdongubler/adhesion-rs/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/erichdongubler/adhesion-rs/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/erichdongubler/adhesion-rs/compare/c34f4006af894faa23b534fc2243720e4b7b5370...v0.2.0
View
@@ -1,7 +1,7 @@
[package]
name = "adhesion"
description = "A set of macros for design by contact in Rust. The design of this library was inspired by D's contract programming facilities."
version = "0.4.0" # remember to update html_root_url
version = "0.5.0" # remember to update html_root_url
authors = ["Erich Gubler <erichdongubler@gmail.com>"]
categories = ["algorithms", "development-tools::testing", "rust-patterns"]

0 comments on commit 38e34b0

Please sign in to comment.