Skip to content

Commit

Permalink
clippy & rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp15b committed Apr 2, 2024
1 parent 4254ffc commit c473dcc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,13 @@ fn expr_eq_infty(vc_expr: Expr) -> Expr {
})
}

fn print_prove_result<'smt, 'ctx>(files_mutex: &Mutex<Files>, smt_translate: &mut TranslateExprs<'smt, 'ctx>, result: ProveResult, name: &SourceUnitName, prover: &Prover<'ctx>) {
fn print_prove_result<'smt, 'ctx>(
files_mutex: &Mutex<Files>,
smt_translate: &mut TranslateExprs<'smt, 'ctx>,
result: ProveResult,
name: &SourceUnitName,
prover: &Prover<'ctx>,
) {
match result {
ProveResult::Proof => println!("{}: Verified.", name),
ProveResult::Counterexample => {
Expand Down
33 changes: 15 additions & 18 deletions src/smt/pretty_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,21 @@ fn pretty_globals<'smt, 'ctx>(
let mut lines: Vec<Doc> = vec![Doc::text(format!("{}s:", kind_name))];

for decl_kind in decls {
match &*decl_kind {
DeclKind::VarDecl(decl_ref) => {
let var_decl = decl_ref.borrow();
let ident = var_decl.name;

// pretty print the value of this variable
let value = pretty_var(translate, ident, model);

// pretty print the span of this variable declaration
let span = pretty_span(files, ident);

lines.push(
Doc::text(format!("{}: ", var_decl.original_name()))
.append(value)
.append(span),
);
}
_ => {}
if let DeclKind::VarDecl(decl_ref) = &*decl_kind {
let var_decl = decl_ref.borrow();
let ident = var_decl.name;

// pretty print the value of this variable
let value = pretty_var(translate, ident, model);

// pretty print the span of this variable declaration
let span = pretty_span(files, ident);

lines.push(
Doc::text(format!("{}: ", var_decl.original_name()))
.append(value)
.append(span),
);
}
}

Expand Down

0 comments on commit c473dcc

Please sign in to comment.