mirror of https://git.sr.ht/~stygianentity/bincode
Fix CI on trunk (#408)
CI was currently broken for two reasons
trunk was not compliant with the 1.41 MSRV check
clippy had new warnings
Since bincode 2.0 is not even in alpha yet MSRV should not be locked in place. This PR removes the MSRV checks for now. Additionally the few clippy warnings have been resolved.
This commit is contained in:
parent
ed3c6f0712
commit
1a76db8540
|
|
@ -25,7 +25,7 @@
|
|||
"stable",
|
||||
"beta",
|
||||
"nightly",
|
||||
"1.41.0"
|
||||
# "1.55.0" TODO: Pick latest stable version when we release 2.0
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||

|
||||
[](https://crates.io/crates/bincode)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://blog.rust-lang.org/2020/02/27/Rust-1.41.1.html)
|
||||
<!-- [](https://blog.rust-lang.org/2020/02/27/Rust-1.41.1.html) -->
|
||||
[](https://matrix.to/#/#bincode:matrix.org)
|
||||
|
||||
A compact encoder / decoder pair that uses a binary zero-fluff encoding scheme.
|
||||
|
|
@ -110,4 +110,4 @@ maximum size limit. Malicious inputs will fail upon deserialization.
|
|||
|
||||
### What is Bincode's MSRV (minimum supported Rust version)?
|
||||
|
||||
Bincode 2.0 maintains support for Rust 1.41.1. Any changes to this are considered a breaking change for semver purposes.
|
||||
Bincode 2.0 is still in development and does not yet have a targetted MSRV. Once 2.0 is fully released the MSRV will be locked. After this point any changes to the MSRV are considered a breaking change for semver purposes.
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ impl<'storage> BincodeRead<'storage> for SliceReader<'storage> {
|
|||
|
||||
#[inline]
|
||||
fn consume(&mut self, n: usize) {
|
||||
self.slice = &self.slice.get(n..).unwrap_or_default();
|
||||
self.slice = self.slice.get(n..).unwrap_or_default();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ where
|
|||
|
||||
fn get_byte_buffer(&mut self, length: usize) -> Result<Vec<u8>> {
|
||||
self.fill_buffer(length)?;
|
||||
Ok(::std::mem::replace(&mut self.temp_buffer, Vec::new()))
|
||||
Ok(::std::mem::take(&mut self.temp_buffer))
|
||||
}
|
||||
|
||||
fn forward_read_bytes<V>(&mut self, length: usize, visitor: V) -> Result<V::Value>
|
||||
|
|
@ -255,7 +255,7 @@ where
|
|||
<Self as std::io::Read>::read_exact(self, &mut temp_buf)?;
|
||||
&temp_buf
|
||||
};
|
||||
let string = match ::std::str::from_utf8(&buf) {
|
||||
let string = match ::std::str::from_utf8(buf) {
|
||||
Ok(s) => s,
|
||||
Err(e) => return Err(crate::ErrorKind::InvalidUtf8Encoding(e).into()),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue