Allow hyper_serde to only depend on serde_core for potentially faster compile times. (#39467)

Serde_core was released which has all the traits and allows some crates
to have parallel compile times.
More information can be found here:
https://github.com/serde-rs/serde/tree/master/serde_core
serde_bytes already depends on on serde_core. Additionally added serde
and serde_core to dependabot group.

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>

Testing: Compilation is the test.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger 2025-09-25 17:54:21 +02:00 committed by GitHub
parent a4c8ffe753
commit e3e2dcb5a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 5 deletions

View file

@ -21,8 +21,9 @@ headers = { workspace = true }
http = { workspace = true }
hyper = { workspace = true }
mime = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true }
serde_core = { workspace = true }
[dev-dependencies]
serde = { workspace = true }
serde_test = "1.0"

View file

@ -73,10 +73,10 @@ use http::HeaderMap;
use hyper::header::{HeaderName, HeaderValue};
use hyper::{Method, StatusCode, Uri};
use mime::Mime;
use serde::de::{self, Error, MapAccess, SeqAccess, Visitor};
use serde::ser::{SerializeMap, SerializeSeq};
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use serde_bytes::{ByteBuf, Bytes};
use serde_core::de::{self, Error, MapAccess, SeqAccess, Visitor};
use serde_core::ser::{SerializeMap, SerializeSeq};
use serde_core::{Deserialize, Deserializer, Serialize, Serializer};
/// Deserialises a `T` value with a given deserializer.
///
@ -164,7 +164,7 @@ pub struct Ser<'a, T: 'a> {
impl<'a, T> Ser<'a, T>
where
Ser<'a, T>: serde::Serialize,
Ser<'a, T>: serde_core::Serialize,
{
/// Returns a new `Ser` wrapper.
#[inline(always)]