serde: Fix Base64 not being Send + Sync
This commit is contained in:
parent
b7bcecbb77
commit
2bdcf8fdfe
@ -11,7 +11,8 @@ use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
|
|||||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct Base64<C = Standard, B = Vec<u8>> {
|
pub struct Base64<C = Standard, B = Vec<u8>> {
|
||||||
bytes: B,
|
bytes: B,
|
||||||
_phantom_conf: PhantomData<*mut C>,
|
// Invariant PhantomData, Send + Sync
|
||||||
|
_phantom_conf: PhantomData<fn(C) -> C>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Config used for the [`Base64`] type.
|
/// Config used for the [`Base64`] type.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user