Skip to content

Commit

Permalink
Cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hawblitzel committed Sep 15, 2021
1 parent afb571b commit 0b23b6c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions verify/rust_verify/src/rust_to_vir_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ pub(crate) fn parse_attrs(attrs: &[Attribute]) -> Result<Vec<Attr>, VirErr> {
Some(box [AttrTree::Fun(_, arg, None)]) if arg == "pub_abstract" => {
v.push(Attr::Abstract)
}
Some(box [AttrTree::Fun(_, arg, None), AttrTree::Fun(_, msg, None)]) if arg == "custom_req_err" => {
Some(box [AttrTree::Fun(_, arg, None), AttrTree::Fun(_, msg, None)])
if arg == "custom_req_err" =>
{
v.push(Attr::CustomReqErr(msg.clone()))
}
_ => {
return err_span_str(span, "unrecognized verifier attribute")
}
_ => return err_span_str(span, "unrecognized verifier attribute"),
},
_ => {}
}
Expand Down Expand Up @@ -267,7 +267,12 @@ pub(crate) struct VerifierAttrs {
}

pub(crate) fn get_verifier_attrs(attrs: &[Attribute]) -> Result<VerifierAttrs, VirErr> {
let mut vs = VerifierAttrs { do_verify: true, external: false, is_abstract: false, custom_req_err: None };
let mut vs = VerifierAttrs {
do_verify: true,
external: false,
is_abstract: false,
custom_req_err: None,
};
for attr in parse_attrs(attrs)? {
match attr {
Attr::NoVerify => vs.do_verify = false,
Expand Down

0 comments on commit 0b23b6c

Please sign in to comment.