Skip to content

Commit 116326d

Browse files
committed
Formatting.
Signed-off-by: Josh Matthews <[email protected]>
1 parent 50c4115 commit 116326d

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

mozjs-sys/src/jsgc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ pub struct RootedBase {
144144
// Annoyingly, bindgen can't cope with SM's use of templates, so we have to roll our own.
145145
#[repr(C)]
146146
#[derive(Debug)]
147-
#[cfg_attr(feature = "crown", allow(crown::unrooted_must_root_lint::allow_unrooted_interior))]
147+
#[cfg_attr(
148+
feature = "crown",
149+
allow(crown::unrooted_must_root_lint::allow_unrooted_interior)
150+
)]
148151
pub struct Rooted<T: RootKind> {
149152
pub vtable: T::Vtable,
150153
pub base: RootedBase,

mozjs/src/gc/custom.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ unsafe impl<T: CustomTrace> CustomTrace for Vec<T> {
5151
// This structure reimplements a C++ class that uses virtual dispatch, so
5252
// use C layout to guarantee that vftable in CustomAutoRooter is in right place.
5353
#[repr(C)]
54-
#[cfg_attr(feature = "crown", allow(crown::unrooted_must_root_lint::allow_unrooted_interior))]
54+
#[cfg_attr(
55+
feature = "crown",
56+
allow(crown::unrooted_must_root_lint::allow_unrooted_interior)
57+
)]
5558
pub struct CustomAutoRooter<T> {
5659
_base: jsapi::CustomAutoRooter,
5760
data: T,
@@ -115,7 +118,10 @@ impl<T: CustomTrace> CustomAutoRooter<T> {
115118
/// DerefMut implementations.
116119
/// This structure is created by `root` method on `CustomAutoRooter` or
117120
/// by the `auto_root!` macro.
118-
#[cfg_attr(feature = "crown", allow(crown::unrooted_must_root_lint::allow_unrooted_interior))]
121+
#[cfg_attr(
122+
feature = "crown",
123+
allow(crown::unrooted_must_root_lint::allow_unrooted_interior)
124+
)]
119125
pub struct CustomAutoRooterGuard<'a, T: 'a + CustomTrace> {
120126
rooter: &'a mut CustomAutoRooter<T>,
121127
}

mozjs/src/gc/root.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ use mozjs_sys::jsgc::ValueArray;
1515
/// Rust API for keeping a Rooted value in the context's root stack.
1616
/// Example usage: `rooted!(in(cx) let x = UndefinedValue());`.
1717
/// `RootedGuard::new` also works, but the macro is preferred.
18-
#[cfg_attr(feature = "crown", allow(crown::unrooted_must_root_lint::allow_unrooted_interior))]
18+
#[cfg_attr(
19+
feature = "crown",
20+
allow(crown::unrooted_must_root_lint::allow_unrooted_interior)
21+
)]
1922
pub struct RootedGuard<'a, T: 'a + RootKind + Initialize> {
2023
root: &'a mut Rooted<T>,
2124
}

0 commit comments

Comments
 (0)