Skip to content

Commit ab166bb

Browse files
authored
fix: explicitly set the named lifetime to static (#895)
Due to a change in Rust nightly, the Rust linter now warns when an elided lifetime ends up being a named lifetime [1]. In this case, the elided lifetime is `'static`, so we should explicitly set the lifetime to `'static`. [1] rust-lang/rust#129207
1 parent f637e50 commit ab166bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/runtime/snapshot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) struct V8Snapshot(pub(crate) &'static [u8]);
2929

3030
pub(crate) fn deconstruct(
3131
slice: &'static [u8],
32-
) -> (V8Snapshot, SerializableSnapshotSidecarData) {
32+
) -> (V8Snapshot, SerializableSnapshotSidecarData<'static>) {
3333
let len =
3434
usize::from_le_bytes(slice[slice.len() - ULEN..].try_into().unwrap());
3535
let data = SerializableSnapshotSidecarData::from_slice(

0 commit comments

Comments
 (0)