From 69b1690525b3d0b70092f3f4634d04e2aa1db0e6 Mon Sep 17 00:00:00 2001 From: Ian Bull Date: Thu, 5 Sep 2024 12:37:10 -0700 Subject: [PATCH] fix: explicitly set the named lifetime to static 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 named lifetime to `'static`. [1] https://github.com/rust-lang/rust/pull/129207 --- core/runtime/snapshot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/runtime/snapshot.rs b/core/runtime/snapshot.rs index 7fc5d051a..7a834af9a 100644 --- a/core/runtime/snapshot.rs +++ b/core/runtime/snapshot.rs @@ -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(