summaryrefslogtreecommitdiff
path: root/rust/src/custombinaryview.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-04-16 17:03:20 -0300
committerRubens Brandao <git@rubens.io>2024-04-16 17:03:20 -0300
commitf3c1a3cb3cbdd25d5f556d1ab770f8cbc29fd567 (patch)
tree71a6f2e8df93f7ef08bda08caca3a637588cc919 /rust/src/custombinaryview.rs
parent37b51462dcf26dc40ac5d7e82acdfd4cbe754157 (diff)
add guard to array with unbound return types
Diffstat (limited to 'rust/src/custombinaryview.rs')
-rw-r--r--rust/src/custombinaryview.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/rust/src/custombinaryview.rs b/rust/src/custombinaryview.rs
index c69bad39..898102d6 100644
--- a/rust/src/custombinaryview.rs
+++ b/rust/src/custombinaryview.rs
@@ -298,12 +298,10 @@ unsafe impl CoreOwnedArrayProvider for BinaryViewType {
}
unsafe impl CoreArrayWrapper for BinaryViewType {
- // TODO there is nothing blocking the returned value from out-living the
- // array, change it to &_ or Guard?
- type Wrapped<'a> = BinaryViewType;
+ type Wrapped<'a> = Guard<'a, BinaryViewType>;
unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> {
- BinaryViewType(*raw)
+ Guard::new(BinaryViewType(*raw), &())
}
}