Skip to content

Commit

Permalink
Fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SandaruKasa committed Aug 3, 2023
1 parent 57619db commit a4322dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[workspace]

members = [
"savefile",
"savefile-derive",
"savefile-test",
"savefile-min-build",
"minitest"
]



resolver = "2"
5 changes: 2 additions & 3 deletions savefile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4585,7 +4585,7 @@ impl<const C:usize> Deserialize for arrayvec::ArrayString<C> {
deserializer.read_bytes_to_buf(&mut tempbuf[0..l])?;

match std::str::from_utf8(&tempbuf[0..l]) {
Ok(s) => Ok(ArrayString::try_from(s)?),
Ok(s) => Ok(arrayvec::ArrayString::try_from(s)?),
Err(_err) => Err(SavefileError::InvalidUtf8 {msg:format!("ArrayString<{}> contained invalid UTF8", C)})
}
}
Expand Down Expand Up @@ -4641,7 +4641,7 @@ impl<V: Serialize, const C: usize> Serialize for arrayvec::ArrayVec<V,C> {

#[cfg(all(not(feature = "nightly"), feature="arrayvec"))]
impl<V: Serialize, const C: usize> Serialize for arrayvec::ArrayVec<V,C> {
fn serialize(&self, serializer: &mut Serializer) -> Result<(), SavefileError> {
fn serialize(&self, serializer: &mut Serializer<impl Write>) -> Result<(), SavefileError> {
regular_serialize_vec(self, serializer)
}
}
Expand Down Expand Up @@ -4777,7 +4777,6 @@ use std::path::{PathBuf, Path};
use std::ptr::NonNull;
use std::slice;
use std::sync::Arc;
use arrayvec::ArrayString;


use byteorder::{ReadBytesExt, WriteBytesExt};
Expand Down

0 comments on commit a4322dc

Please sign in to comment.