Skip to content

Commit 0953ada

Browse files
committed
chore(contracts): prepare release 0.6.7
1 parent 0b2c8cb commit 0953ada

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

.cspell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: "0.2"
22
words:
33
- clippy
44
- codegen
5+
- ctype
56
- direnv
67
- elems
78
- msrv

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Unreleased
88

9+
## 0.6.7
10+
11+
- Correctly handle return statement inside closures.
12+
913
## 0.6.6
1014

1115
- Update `syn` requirement to `2`.

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contracts"
3-
version = "0.6.6"
3+
version = "0.6.7"
44
description = "Design-by-contract attributes"
55
authors = ["karroffel <[email protected]>"]
66
categories = ["development-tools", "development-tools::procedural-macro-helpers"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<!-- prettier-ignore-start -->
66

77
[![crates.io](https://img.shields.io/crates/v/contracts?label=latest)](https://crates.io/crates/contracts)
8-
[![Documentation](https://docs.rs/contracts/badge.svg?version=0.6.6)](https://docs.rs/contracts/0.6.6)
9-
[![dependency status](https://deps.rs/crate/contracts/0.6.6/status.svg)](https://deps.rs/crate/contracts/0.6.6)
8+
[![Documentation](https://docs.rs/contracts/badge.svg?version=0.6.7)](https://docs.rs/contracts/0.6.7)
9+
[![dependency status](https://deps.rs/crate/contracts/0.6.7/status.svg)](https://deps.rs/crate/contracts/0.6.7)
1010
![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/contracts.svg)
1111
<br />
1212
[![CI](https://github.com/x52dev/contracts/actions/workflows/ci.yml/badge.svg)](https://github.com/x52dev/contracts-rs/actions/workflows/ci.yml)

src/implementation/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ pub(crate) fn generate(
363363

364364
// replace the old function body with the new one
365365

366-
func.function.block = Box::new(syn::parse_quote!(#new_block));
366+
*func.function.block = syn::parse_quote!(#new_block);
367367

368368
func.function.into_token_stream()
369369
}

tests/issues.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@ fn gl_issue_18() {
9797
assert_eq!(1, euclidean(3, 4));
9898
}
9999

100-
#[allow(unused)] // compile-only test
100+
#[expect(clippy::assertions_on_constants)]
101101
#[test]
102102
fn gl_issue_41() {
103103
use contracts::requires;
104104

105+
#[expect(dead_code)]
105106
fn foo(f: impl Fn(i32) -> i32) -> i32 {
106107
// no-op
107108
f(-10)

0 commit comments

Comments
 (0)