mirror of https://git.sr.ht/~stygianentity/bincode
Fixed a warning in a derive test that would cause CI to fail (#716)
* Fixed a warning in a derive test that would cause CI to fail * Fixed new clippy warning * Commented out breaking cross builds --------- Co-authored-by: Victor Koenders <victor.koenders@qrtech.se>
This commit is contained in:
parent
beec84b3ee
commit
f737f21250
|
|
@ -25,13 +25,26 @@
|
||||||
"platform": [
|
"platform": [
|
||||||
# Tier 1
|
# Tier 1
|
||||||
"aarch64-unknown-linux-gnu",
|
"aarch64-unknown-linux-gnu",
|
||||||
"i686-pc-windows-gnu",
|
# 0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
|
||||||
|
# 0050:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
|
||||||
|
# 0050:err:systray:initialize_systray Could not create tray window
|
||||||
|
# 0024:err:module:import_dll Library bcryptprimitives.dll (which is needed by L"Z:\\target\\i686-pc-windows-gnu\\debug\\deps\\bincode-569310bd32491256.exe") not found
|
||||||
|
# 0024:err:module:LdrInitializeThunk Importing dlls for L"Z:\\target\\i686-pc-windows-gnu\\debug\\deps\\bincode-569310bd32491256.exe" failed, status c0000135
|
||||||
|
# "i686-pc-windows-gnu",
|
||||||
|
|
||||||
# `cross` does not provide a Docker image for target i686-pc-windows-msvc
|
# `cross` does not provide a Docker image for target i686-pc-windows-msvc
|
||||||
# "i686-pc-windows-msvc",
|
# "i686-pc-windows-msvc",
|
||||||
"i686-unknown-linux-gnu",
|
"i686-unknown-linux-gnu",
|
||||||
# `cross` does not provide a Docker image for target x86_64-apple-darwin
|
# `cross` does not provide a Docker image for target x86_64-apple-darwin
|
||||||
# "x86_64-apple-darwin",
|
# "x86_64-apple-darwin",
|
||||||
"x86_64-pc-windows-gnu",
|
|
||||||
|
# 0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
|
||||||
|
# 0050:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
|
||||||
|
# 0050:err:systray:initialize_systray Could not create tray window
|
||||||
|
# 00f4:err:module:import_dll Library bcryptprimitives.dll (which is needed by L"Z:\\target\\x86_64-pc-windows-gnu\\debug\\deps\\bincode-b91af23bf3efc9f3.exe") not found
|
||||||
|
# 00f4:err:module:LdrInitializeThunk Importing dlls for L"Z:\\target\\x86_64-pc-windows-gnu\\debug\\deps\\bincode-b91af23bf3efc9f3.exe" failed, status c0000135
|
||||||
|
# "x86_64-pc-windows-gnu",
|
||||||
|
|
||||||
# `cross` does not provide a Docker image for target x86_64-pc-windows-msvc
|
# `cross` does not provide a Docker image for target x86_64-pc-windows-msvc
|
||||||
# "x86_64-pc-windows-msvc",
|
# "x86_64-pc-windows-msvc",
|
||||||
"x86_64-unknown-linux-gnu",
|
"x86_64-unknown-linux-gnu",
|
||||||
|
|
|
||||||
|
|
@ -167,9 +167,9 @@ where
|
||||||
0u8.encode(self.enc)
|
0u8.encode(self.enc)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_some<T: ?Sized>(mut self, value: &T) -> Result<Self::Ok, Self::Error>
|
fn serialize_some<T>(mut self, value: &T) -> Result<Self::Ok, Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
1u8.encode(&mut self.enc)?;
|
1u8.encode(&mut self.enc)?;
|
||||||
value.serialize(self)
|
value.serialize(self)
|
||||||
|
|
@ -192,18 +192,18 @@ where
|
||||||
variant_index.encode(self.enc)
|
variant_index.encode(self.enc)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_newtype_struct<T: ?Sized>(
|
fn serialize_newtype_struct<T>(
|
||||||
self,
|
self,
|
||||||
_name: &'static str,
|
_name: &'static str,
|
||||||
value: &T,
|
value: &T,
|
||||||
) -> Result<Self::Ok, Self::Error>
|
) -> Result<Self::Ok, Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(self)
|
value.serialize(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_newtype_variant<T: ?Sized>(
|
fn serialize_newtype_variant<T>(
|
||||||
mut self,
|
mut self,
|
||||||
_name: &'static str,
|
_name: &'static str,
|
||||||
variant_index: u32,
|
variant_index: u32,
|
||||||
|
|
@ -211,7 +211,7 @@ where
|
||||||
value: &T,
|
value: &T,
|
||||||
) -> Result<Self::Ok, Self::Error>
|
) -> Result<Self::Ok, Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
variant_index.encode(&mut self.enc)?;
|
variant_index.encode(&mut self.enc)?;
|
||||||
value.serialize(self)
|
value.serialize(self)
|
||||||
|
|
@ -272,9 +272,9 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(feature = "alloc"))]
|
#[cfg(not(feature = "alloc"))]
|
||||||
fn collect_str<T: ?Sized>(self, _: &T) -> Result<Self::Ok, Self::Error>
|
fn collect_str<T>(self, _: &T) -> Result<Self::Ok, Self::Error>
|
||||||
where
|
where
|
||||||
T: core::fmt::Display,
|
T: core::fmt::Display + ?Sized,
|
||||||
{
|
{
|
||||||
Err(SerdeEncodeError::CannotCollectStr.into())
|
Err(SerdeEncodeError::CannotCollectStr.into())
|
||||||
}
|
}
|
||||||
|
|
@ -290,9 +290,9 @@ impl<'a, ENC: Encoder> SerializeSeq for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -306,9 +306,9 @@ impl<'a, ENC: Encoder> SerializeTuple for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
fn serialize_element<T>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -322,9 +322,9 @@ impl<'a, ENC: Encoder> SerializeTupleStruct for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -338,9 +338,9 @@ impl<'a, ENC: Encoder> SerializeTupleVariant for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_field<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
fn serialize_field<T>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -354,16 +354,16 @@ impl<'a, ENC: Encoder> SerializeMap for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_key<T: ?Sized>(&mut self, key: &T) -> Result<(), Self::Error>
|
fn serialize_key<T>(&mut self, key: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
key.serialize(SerdeEncoder { enc: self.enc })
|
key.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_value<T: ?Sized>(&mut self, value: &T) -> Result<(), Self::Error>
|
fn serialize_value<T>(&mut self, value: &T) -> Result<(), Self::Error>
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -377,13 +377,9 @@ impl<'a, ENC: Encoder> SerializeStruct for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_field<T: ?Sized>(
|
fn serialize_field<T>(&mut self, _key: &'static str, value: &T) -> Result<(), Self::Error>
|
||||||
&mut self,
|
|
||||||
_key: &'static str,
|
|
||||||
value: &T,
|
|
||||||
) -> Result<(), Self::Error>
|
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
@ -397,13 +393,9 @@ impl<'a, ENC: Encoder> SerializeStructVariant for Compound<'a, ENC> {
|
||||||
type Ok = ();
|
type Ok = ();
|
||||||
type Error = EncodeError;
|
type Error = EncodeError;
|
||||||
|
|
||||||
fn serialize_field<T: ?Sized>(
|
fn serialize_field<T>(&mut self, _key: &'static str, value: &T) -> Result<(), Self::Error>
|
||||||
&mut self,
|
|
||||||
_key: &'static str,
|
|
||||||
value: &T,
|
|
||||||
) -> Result<(), Self::Error>
|
|
||||||
where
|
where
|
||||||
T: Serialize,
|
T: Serialize + ?Sized,
|
||||||
{
|
{
|
||||||
value.serialize(SerdeEncoder { enc: self.enc })
|
value.serialize(SerdeEncoder { enc: self.enc })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ extern crate core as bincode;
|
||||||
|
|
||||||
#[derive(bincode_new::Encode)]
|
#[derive(bincode_new::Encode)]
|
||||||
#[bincode(crate = "bincode_new")]
|
#[bincode(crate = "bincode_new")]
|
||||||
|
#[allow(dead_code)]
|
||||||
struct DeriveRenameTest {
|
struct DeriveRenameTest {
|
||||||
a: u32,
|
a: u32,
|
||||||
b: u32,
|
b: u32,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue