Skip to content

Commit

Permalink
Fix semicolon_if_nothing_returned lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Oct 27, 2023
1 parent 0367252 commit 849330e
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion z3/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl Config {
self.z3_cfg,
self.kvs.last().unwrap().0.as_ptr(),
self.kvs.last().unwrap().1.as_ptr(),
)
);
};
}

Expand Down
4 changes: 2 additions & 2 deletions z3/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Context {

/// Interrupt a solver performing a satisfiability test, a tactic processing a goal, or simplify functions.
pub fn interrupt(&self) {
self.handle().interrupt()
self.handle().interrupt();
}

/// Obtain a handle that can be used to interrupt computation from another thread.
Expand Down Expand Up @@ -51,7 +51,7 @@ impl Context {
///
/// - [`Context::update_param_value()`]
pub fn update_bool_param_value(&mut self, k: &str, v: bool) {
self.update_param_value(k, if v { "true" } else { "false" })
self.update_param_value(k, if v { "true" } else { "false" });
}
}

Expand Down
2 changes: 1 addition & 1 deletion z3/src/datatype_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn create_datatypes<'ctx>(
});
}

datatype_sorts.push(DatatypeSort { sort, variants })
datatype_sorts.push(DatatypeSort { sort, variants });
}

for ctor in ctors {
Expand Down
6 changes: 3 additions & 3 deletions z3/src/func_interp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<'ctx> FuncInterp<'ctx> {
args.iter()
.for_each(|a| Z3_ast_vector_push(self.ctx.z3_ctx, v, a.z3_ast));

Z3_func_interp_add_entry(self.ctx.z3_ctx, self.z3_func_interp, v, value.z3_ast)
Z3_func_interp_add_entry(self.ctx.z3_ctx, self.z3_func_interp, v, value.z3_ast);
}
}

Expand Down Expand Up @@ -74,7 +74,7 @@ impl<'ctx> fmt::Display for FuncInterp<'ctx> {
self.get_entries().into_iter().try_for_each(|e| {
let n = e.get_num_args();
if n > 1 {
write!(f, "[")?
write!(f, "[")?;
};
write!(
f,
Expand All @@ -86,7 +86,7 @@ impl<'ctx> fmt::Display for FuncInterp<'ctx> {
.join(", ")
)?;
if n > 1 {
write!(f, "]")?
write!(f, "]")?;
}
write!(f, " -> {}, ", e.get_value())
})?;
Expand Down
8 changes: 4 additions & 4 deletions z3/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<'ctx> Params<'ctx> {
self.z3_params,
k.into().as_z3_symbol(self.ctx),
v.into().as_z3_symbol(self.ctx),
)
);
};
}

Expand All @@ -33,7 +33,7 @@ impl<'ctx> Params<'ctx> {
self.z3_params,
k.into().as_z3_symbol(self.ctx),
v,
)
);
};
}

Expand All @@ -44,7 +44,7 @@ impl<'ctx> Params<'ctx> {
self.z3_params,
k.into().as_z3_symbol(self.ctx),
v,
)
);
};
}

Expand All @@ -55,7 +55,7 @@ impl<'ctx> Params<'ctx> {
self.z3_params,
k.into().as_z3_symbol(self.ctx),
v,
)
);
};
}
}
Expand Down
14 changes: 7 additions & 7 deletions z3/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ fn test_string_eq() {
assert_eq!(solver.check(), SatResult::Sat);

solver.assert(&h._eq(&z));
assert_eq!(solver.check(), SatResult::Unsat)
assert_eq!(solver.check(), SatResult::Unsat);
}

#[test]
Expand All @@ -542,7 +542,7 @@ fn test_string_concat() {
let z = ast::String::from_str(&ctx, "foobar").unwrap();

solver.assert(&ast::String::concat(&ctx, &[&x, &y])._eq(&z));
assert_eq!(solver.check(), SatResult::Sat)
assert_eq!(solver.check(), SatResult::Sat);
}

#[test]
Expand All @@ -555,7 +555,7 @@ fn test_string_prefix() {
let y = ast::String::from_str(&ctx, "foobar").unwrap();

solver.assert(&x.prefix(&y));
assert_eq!(solver.check(), SatResult::Sat)
assert_eq!(solver.check(), SatResult::Sat);
}

#[test]
Expand All @@ -568,7 +568,7 @@ fn test_string_suffix() {
let y = ast::String::from_str(&ctx, "foobar").unwrap();

solver.assert(&x.suffix(&y));
assert_eq!(solver.check(), SatResult::Sat)
assert_eq!(solver.check(), SatResult::Sat);
}

fn assert_string_roundtrip(source: &str) {
Expand Down Expand Up @@ -615,7 +615,7 @@ fn test_rec_func_def() {
solver.assert(&y._eq(&fac.apply(&[&ast::Int::from_i64(&ctx, 5)]).as_int().unwrap()));
solver.assert(&y._eq(&ast::Int::from_i64(&ctx, 120)));

assert_eq!(solver.check(), SatResult::Sat)
assert_eq!(solver.check(), SatResult::Sat);
}

#[test]
Expand Down Expand Up @@ -650,7 +650,7 @@ fn test_rec_func_def_unsat() {
// To see this, comment out `fac.add_def(&[&n.into()], &body);`
solver.assert(&y._eq(&ast::Int::from_i64(&ctx, 25)));

assert_eq!(solver.check(), SatResult::Unsat)
assert_eq!(solver.check(), SatResult::Unsat);
}

#[test]
Expand Down Expand Up @@ -1781,5 +1781,5 @@ fn iterate_all_solutions() {
]
.into_iter()
.collect()
)
);
}
8 changes: 4 additions & 4 deletions z3/tests/semver_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ fn test_solve_simple_semver_example() {
None => (),
Some(low) => {
info!("Asserting: {} >= #{} (root)", k, low);
opt.assert(&ast.ge(&ast::Int::from_u64(&ctx, low as u64)))
opt.assert(&ast.ge(&ast::Int::from_u64(&ctx, low as u64)));
}
}
match last_version_req_index(&smap, k, v) {
None => (),
Some(high) => {
info!("Asserting: {} <= #{} (root)", k, high);
opt.assert(&ast.le(&ast::Int::from_u64(&ctx, high as u64)))
opt.assert(&ast.le(&ast::Int::from_u64(&ctx, high as u64)));
}
}
asts.insert(k.clone(), ast);
Expand Down Expand Up @@ -224,7 +224,7 @@ fn test_solve_simple_semver_example() {
&k_ast
._eq(&ast::Int::from_u64(&ctx, n as u64))
.implies(&r_ast.ge(&ast::Int::from_u64(&ctx, low as u64))),
)
);
}
}
match last_version_req_index(&smap, r, req) {
Expand All @@ -243,7 +243,7 @@ fn test_solve_simple_semver_example() {
&k_ast
._eq(&ast::Int::from_u64(&ctx, n as u64))
.implies(&r_ast.le(&ast::Int::from_u64(&ctx, high as u64))),
)
);
}
}
}
Expand Down

0 comments on commit 849330e

Please sign in to comment.