about summary refs log tree commit diff
path: root/users/edef/weave/src
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2024-10-17T22·37+0000
committerclbot <clbot@tvl.fyi>2024-10-17T22·47+0000
commitdfff5927842c95492f097b85e722ed7129642845 (patch)
tree8cfa75acf0ea1d9cef333d2186126c0752dd1d9d /users/edef/weave/src
parent211cf7ba7cb69e5728e5826333d7072c05730c97 (diff)
fix(users/edef/weave): use safer_owning_ref r/8828
owning_ref has serious unsoundness.

Change-Id: Ie760697cd6399e6bc75f1ad17c9bb74adc077a35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12656
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Autosubmit: edef <edef@edef.eu>
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'users/edef/weave/src')
-rw-r--r--users/edef/weave/src/bytes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/edef/weave/src/bytes.rs b/users/edef/weave/src/bytes.rs
index c6dc2ebb4492..689b8fdfc0c8 100644
--- a/users/edef/weave/src/bytes.rs
+++ b/users/edef/weave/src/bytes.rs
@@ -3,7 +3,7 @@ use polars::export::arrow::buffer::Buffer;
 use std::ops::Deref;
 
 /// An shared `[[u8; N]]` backed by a Polars [Buffer].
-pub type FixedBytes<const N: usize> = OwningRef<Bytes, [[u8; N]]>;
+pub type FixedBytes<const N: usize> = OwningRef<'static, Bytes, [[u8; N]]>;
 
 /// Wrapper struct to make [Buffer] implement [StableAddress].
 /// TODO(edef): upstream the `impl`
@@ -13,7 +13,7 @@ pub struct Bytes(pub Buffer<u8>);
 unsafe impl StableAddress for Bytes {}
 
 impl Bytes {
-    pub fn map<U: ?Sized>(self, f: impl FnOnce(&[u8]) -> &U) -> OwningRef<Self, U> {
+    pub fn map<U: ?Sized>(self, f: impl FnOnce(&[u8]) -> &U) -> OwningRef<'static, Self, U> {
         OwningRef::new(self).map(f)
     }
 }