Skip to content

Commit 0fbaafe

Browse files
committed
update for fmt
1 parent 48f00f8 commit 0fbaafe

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

rapx/src/analysis/safedrop/alias.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ impl<'tcx> SafeDropGraph<'tcx> {
249249
if !self.values[rv].fields.contains_key(&index) {
250250
let need_drop = ret_alias.right_need_drop;
251251
let may_drop = ret_alias.right_may_drop;
252-
let mut node = ValueNode::new(self.alias_set.len(), right_init, need_drop, may_drop);
252+
let mut node =
253+
ValueNode::new(self.alias_set.len(), right_init, need_drop, may_drop);
253254
node.kind = TyKind::RawPtr;
254255
node.birth = self.values[rv].birth;
255256
node.field_id = *index;

rapx/src/analysis/safedrop/check_bugs.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ impl<'tcx> SafeDropGraph<'tcx> {
4747
record: &mut FxHashSet<usize>,
4848
dangling: bool,
4949
) -> bool {
50-
if node>= self.values.len() { return false; }
50+
if node >= self.values.len() {
51+
return false;
52+
}
5153
//if is a dangling pointer check, only check the pointer type varible.
5254
if self.values[node].is_alive() == false
5355
&& (dangling && self.values[node].is_ptr() || !dangling)

0 commit comments

Comments
 (0)