Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Nov 5, 2022
1 parent 31bc09a commit 4668664
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion boa_gc/src/gc_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
6 changes: 2 additions & 4 deletions boa_gc/src/pointers/gc_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: ?Sized, U>(mut ptr: *mut T, data: *mut U) -> *mut T {
ptr::write(&mut ptr as *mut _ as *mut *mut u8, data as *mut u8);
Expand Down

0 comments on commit 4668664

Please sign in to comment.