replace PhantomData in async_db::Writer

for Send for Writer
This commit is contained in:
Dmitry Belyaev 2023-08-08 14:25:01 +03:00
parent b768d27f83
commit a1a1d41403
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -1,4 +1,4 @@
use std::{marker::PhantomData, path::Path, sync::Arc}; use std::{path::Path, sync::Arc};
use async_compression::tokio::bufread::ZstdDecoder; use async_compression::tokio::bufread::ZstdDecoder;
use async_compression::tokio::write::ZstdEncoder; use async_compression::tokio::write::ZstdEncoder;
@ -48,7 +48,7 @@ where
data_buf: Vec<u8>, data_buf: Vec<u8>,
table: Vec<LSize>, table: Vec<LSize>,
compress_lvl: Level, compress_lvl: Level,
_t: PhantomData<*const T>, _t: Option<Arc<T>>, // PhantomData replacement
} }
impl<T> Writer<T> impl<T> Writer<T>
@ -69,7 +69,7 @@ where
data_buf, data_buf,
table, table,
compress_lvl, compress_lvl,
_t: PhantomData, _t: None,
}) })
} }