fix(argus-core): disable clippy warnings for proptest

This commit is contained in:
Anand Balakrishnan 2023-09-07 13:24:13 -07:00
parent f00fe25c58
commit 3a9623b99b
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View file

@ -14,6 +14,6 @@ repos:
entry: nox -t fix style lint entry: nox -t fix style lint
language: system language: system
pass_filenames: false pass_filenames: false
types: types_or:
- rust - rust
- python - python

View file

@ -376,6 +376,7 @@ pub mod arbitrary {
"[[:word:]]*".prop_map(|name| Box::new((FloatVar { name }).into())), "[[:word:]]*".prop_map(|name| Box::new((FloatVar { name }).into())),
]; ];
#[allow(clippy::arc_with_non_send_sync)]
leaf.prop_recursive( leaf.prop_recursive(
8, // 8 levels deep 8, // 8 levels deep
128, // Shoot for maximum size of 256 nodes 128, // Shoot for maximum size of 256 nodes
@ -418,12 +419,14 @@ pub mod arbitrary {
/// Generate arbitrary boolean expressions /// Generate arbitrary boolean expressions
pub fn bool_expr() -> impl Strategy<Value = Box<BoolExpr>> { pub fn bool_expr() -> impl Strategy<Value = Box<BoolExpr>> {
#[allow(clippy::arc_with_non_send_sync)]
let leaf = prop_oneof![ let leaf = prop_oneof![
any::<bool>().prop_map(|val| Box::new(BoolLit(val).into())), any::<bool>().prop_map(|val| Box::new(BoolLit(val).into())),
"[[:word:]]*".prop_map(|name| Box::new((BoolVar { name }).into())), "[[:word:]]*".prop_map(|name| Box::new((BoolVar { name }).into())),
cmp_expr(), cmp_expr(),
]; ];
#[allow(clippy::arc_with_non_send_sync)]
leaf.prop_recursive( leaf.prop_recursive(
8, // 8 levels deep 8, // 8 levels deep
128, // Shoot for maximum size of 256 nodes 128, // Shoot for maximum size of 256 nodes