From 466866466be3eb5dde7a85d863624bca64c09c8d Mon Sep 17 00:00:00 2001 From: nekevss Date: Sat, 5 Nov 2022 12:33:36 -0400 Subject: [PATCH] Rustfmt --- boa_gc/src/gc_box.rs | 2 +- boa_gc/src/pointers/gc_ptr.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/boa_gc/src/gc_box.rs b/boa_gc/src/gc_box.rs index e1d16062984..a0bd58b5a89 100644 --- a/boa_gc/src/gc_box.rs +++ b/boa_gc/src/gc_box.rs @@ -65,7 +65,7 @@ impl GcBoxHeader { pub fn dec_roots(&self) { // Underflow check as a stop gap for current issue when dropping if self.roots.get() > 0 { - self.roots.set(self.roots.get() - 1) + self.roots.set(self.roots.get() - 1) } } diff --git a/boa_gc/src/pointers/gc_ptr.rs b/boa_gc/src/pointers/gc_ptr.rs index 3f52161890b..96e09199f99 100644 --- a/boa_gc/src/pointers/gc_ptr.rs +++ b/boa_gc/src/pointers/gc_ptr.rs @@ -8,10 +8,8 @@ use std::ptr::{self, NonNull}; use std::rc::Rc; use crate::gc_box::GcBox; -use crate::{BoaAlloc, finalizer_safe}; -use crate::{ - trace::{Finalize, Trace}, -}; +use crate::trace::{Finalize, Trace}; +use crate::{finalizer_safe, BoaAlloc}; pub(crate) unsafe fn set_data_ptr(mut ptr: *mut T, data: *mut U) -> *mut T { ptr::write(&mut ptr as *mut _ as *mut *mut u8, data as *mut u8);