From 37b51462dcf26dc40ac5d7e82acdfd4cbe754157 Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Wed, 10 Apr 2024 17:58:05 -0300 Subject: fix the array implementation using GAT --- rust/src/downloadprovider.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'rust/src/downloadprovider.rs') diff --git a/rust/src/downloadprovider.rs b/rust/src/downloadprovider.rs index 97ebbdbc..cc243722 100644 --- a/rust/src/downloadprovider.rs +++ b/rust/src/downloadprovider.rs @@ -71,10 +71,12 @@ unsafe impl CoreOwnedArrayProvider for DownloadProvider { } } -unsafe impl<'a> CoreArrayWrapper<'a> for DownloadProvider { - type Wrapped = DownloadProvider; +unsafe impl CoreArrayWrapper for DownloadProvider { + // TODO there is nothing blocking the returned value from out-living the + // array, change it to &_ or Guard? + type Wrapped<'a> = DownloadProvider; - unsafe fn wrap_raw(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped { + unsafe fn wrap_raw<'a>(raw: &'a Self::Raw, _context: &'a Self::Context) -> Self::Wrapped<'a> { DownloadProvider::from_raw(*raw) } } -- cgit v1.3.1