Skip to content

Commit bd7e2cb

Browse files
committed
Fix mismatched_lifetime_syntaxes warning
Signed-off-by: Jonathan Schwender <[email protected]>
1 parent 8bf5bf8 commit bd7e2cb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

mozjs/src/gc/collections.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ where
125125
Heap<T>: Traceable + 'static,
126126
T: GCMethods + Copy,
127127
{
128-
pub fn handle(&self) -> Handle<T> {
128+
pub fn handle(&self) -> Handle<'_, T> {
129129
unsafe { Handle::from_raw((*self.ptr).handle()) }
130130
}
131131
}

mozjs/src/gc/custom.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<T: CustomTrace> CustomAutoRooter<T> {
106106
}
107107
}
108108

109-
pub fn root(&mut self, cx: *mut JSContext) -> CustomAutoRooterGuard<T> {
109+
pub fn root(&mut self, cx: *mut JSContext) -> CustomAutoRooterGuard<'_, T> {
110110
CustomAutoRooterGuard::new(cx, self)
111111
}
112112
}
@@ -140,7 +140,7 @@ impl<'a, T: 'a + CustomTrace> CustomAutoRooterGuard<'a, T> {
140140
Handle::new(&self.rooter.data)
141141
}
142142

143-
pub fn handle_mut(&mut self) -> MutableHandle<T>
143+
pub fn handle_mut(&mut self) -> MutableHandle<'_, T>
144144
where
145145
T: RootKind,
146146
{

mozjs/src/gc/root.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl<'a, T: 'a + RootKind> RootedGuard<'a, T> {
4242
Handle::new(&self)
4343
}
4444

45-
pub fn handle_mut(&mut self) -> MutableHandle<T> {
45+
pub fn handle_mut(&mut self) -> MutableHandle<'_, T> {
4646
unsafe { MutableHandle::from_marked_location(self.as_ptr()) }
4747
}
4848

@@ -206,7 +206,7 @@ impl<'a, T> MutableHandle<'a, T> {
206206
MutableHandle::from_marked_location(handle.ptr)
207207
}
208208

209-
pub fn handle(&self) -> Handle<T> {
209+
pub fn handle(&self) -> Handle<'_, T> {
210210
unsafe { Handle::new(&*self.ptr) }
211211
}
212212

0 commit comments

Comments
 (0)