Skip to content

Commit

Permalink
fix: explicitly set the named lifetime to static (#895)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
irbull committed Sep 6, 2024
1 parent f637e50 commit ab166bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/runtime/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) struct V8Snapshot(pub(crate) &'static [u8]);

pub(crate) fn deconstruct(
slice: &'static [u8],
) -> (V8Snapshot, SerializableSnapshotSidecarData) {
) -> (V8Snapshot, SerializableSnapshotSidecarData<'static>) {
let len =
usize::from_le_bytes(slice[slice.len() - ULEN..].try_into().unwrap());
let data = SerializableSnapshotSidecarData::from_slice(
Expand Down

0 comments on commit ab166bb

Please sign in to comment.