Skip to content

Commit ba3bdc7

Browse files
committed
cargo fmt
1 parent 500600a commit ba3bdc7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

libcc2rs/src/rc.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,11 +1235,10 @@ impl RangeAllocator {
12351235
}
12361236

12371237
fn base_for(&mut self, real_addr: RealAddr, byte_len: ByteLen) -> SyntheticAddr {
1238-
if let Some(&(base, capacity)) = self.bases.get(&real_addr) {
1239-
if byte_len <= capacity {
1238+
if let Some(&(base, capacity)) = self.bases.get(&real_addr)
1239+
&& byte_len <= capacity {
12401240
return base;
12411241
}
1242-
}
12431242
let base = self.cursor;
12441243
self.cursor = base + byte_len + 1;
12451244
self.bases.insert(real_addr, (base, byte_len));
@@ -1270,8 +1269,7 @@ impl<T: ByteRepr> ByteRepr for Ptr<T> {
12701269
self.len() * T::byte_size(),
12711270
),
12721271
};
1273-
let base =
1274-
PTR_RANGE_ALLOC.with(|a| a.borrow_mut().base_for(self.kind.address(), byte_len));
1272+
let base = PTR_RANGE_ALLOC.with(|a| a.borrow_mut().base_for(self.kind.address(), byte_len));
12751273
let rebased = Ptr {
12761274
offset: 0,
12771275
kind: self.kind.clone(),

0 commit comments

Comments
 (0)