Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brmataptos committed Nov 22, 2024
1 parent 14473ed commit 9b3a2af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
9 changes: 3 additions & 6 deletions third_party/move/move-model/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,9 @@ impl ExpData {
pub fn called_funs(&self) -> BTreeSet<QualifiedId<FunId>> {
let mut called = BTreeSet::new();
let mut visitor = |e: &ExpData| {
match e {
ExpData::Call(_, Operation::MoveFunction(mid, fid), _) => {
called.insert(mid.qualified(*fid));
},
_ => {},
}
if let ExpData::Call(_, Operation::MoveFunction(mid, fid), _) = e {
called.insert(mid.qualified(*fid));
};
true // keep going
};
self.visit_post_order(&mut visitor);
Expand Down
27 changes: 12 additions & 15 deletions third_party/move/move-model/src/sourcifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,21 +538,18 @@ impl<'a> ExpSourcifier<'a> {
Value(id, v) => {
let ty = self.env().get_node_type(exp.node_id());
self.parent.print_value(v, Some(&ty));
match v {
ast::Value::Function(..) => {
let type_inst = self.env().get_node_instantiation(*id);
if !type_inst.is_empty() {
emit!(
self.wr(),
"<{}>",
type_inst
.iter()
.map(|ty| ty.display(&self.type_display_context))
.join(", ")
);
}
},
_ => {},
if let ast::Value::Function(..) = v {
let type_inst = self.env().get_node_instantiation(*id);
if !type_inst.is_empty() {
emit!(
self.wr(),
"<{}>",
type_inst
.iter()
.map(|ty| ty.display(&self.type_display_context))
.join(", ")
);
}
}
},
LocalVar(_, name) => {
Expand Down

0 comments on commit 9b3a2af

Please sign in to comment.