File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 6
6
- nextest
7
7
- nixos
8
8
- nixpkgs
9
+ - nonminimal
9
10
- pkgs
10
11
- RUSTDOCFLAGS
11
12
- taplo
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ impl Library {
24
24
self . available . insert ( book_id. to_string ( ) ) ;
25
25
}
26
26
27
- #[ allow( clippy:: nonminimal_bool) ]
28
27
#[ debug_requires( self . book_exists( book_id) ) ]
29
28
#[ ensures( ret -> self . available. len( ) == old( self . available. len( ) ) - 1 ) ]
30
29
#[ ensures( ret -> self . lent. len( ) == old( self . lent. len( ) ) + 1 ) ]
Original file line number Diff line number Diff line change @@ -185,15 +185,20 @@ pub(crate) fn generate(
185
185
186
186
if mode == ContractMode :: LogOnly {
187
187
result. extend ( quote:: quote_spanned! { span=>
188
- if !( #exec_expr) {
189
- log:: error!( "{}" , #format_args) ;
188
+ #[ allow( clippy:: nonminimal_bool) ]
189
+ {
190
+ if !( #exec_expr) {
191
+ log:: error!( "{}" , #format_args) ;
192
+ }
190
193
}
191
194
} ) ;
192
195
}
193
196
194
197
if let Some ( assert_macro) = get_assert_macro ( ctype, mode, span) {
195
198
result. extend ( quote:: quote_spanned! { span=>
196
- #assert_macro!( #exec_expr, "{}" , #format_args) ;
199
+ #[ allow( clippy:: nonminimal_bool) ] {
200
+ #assert_macro!( #exec_expr, "{}" , #format_args) ;
201
+ }
197
202
} ) ;
198
203
}
199
204
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ use contracts::*;
7
7
#[ cfg( feature = "mirai_assertions" ) ]
8
8
mod mirai_assertion_mocks;
9
9
10
- #[ allow( clippy:: nonminimal_bool) ]
11
10
#[ test]
12
11
fn test_ret_implication ( ) {
13
12
#[ ensures( do_thing -> ret. is_some( ) , "do_thing should cause a Some(_)" ) ]
@@ -24,7 +23,6 @@ fn test_ret_implication() {
24
23
perform_thing ( false ) ;
25
24
}
26
25
27
- #[ allow( clippy:: nonminimal_bool) ]
28
26
#[ test]
29
27
fn test_ret_implication_old ( ) {
30
28
#[ ensures( old( * x) % 2 == 0 -> * x % 2 == 0 ) ]
@@ -40,7 +38,6 @@ fn test_ret_implication_old() {
40
38
incr ( & mut x) ;
41
39
}
42
40
43
- #[ allow( clippy:: nonminimal_bool) ]
44
41
#[ test]
45
42
fn test_requires_implication ( ) {
46
43
#[ requires( !negative -> value >= 0 ) ]
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ fn gl_issue_11() {
12
12
13
13
#[ ensures( self . contains_key( key) -> ret. is_some( ) ) ]
14
14
#[ ensures( !self . contains_key( key) -> ret. is_none( ) ) ]
15
- #[ ensures( true ) ]
16
15
pub fn get_mut ( & mut self , key : & str ) -> Option < & mut u8 > {
17
16
None
18
17
}
You can’t perform that action at this time.
0 commit comments