Skip to content

Commit

Permalink
Update to savefile 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
avl authored and djkoloski committed Jul 13, 2023
1 parent 526d903 commit 18f6d85
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ serde_json = { version = "1.0.96", optional = true }
simd-json = { version = "0.9.2", optional = true }
simd-json-derive = { version = "0.9.2", optional = true }
speedy = { version = "0.8.6", optional = true }
savefile = { version = "0.13", optional = true }
savefile-derive = { version = "0.13", optional = true }
savefile = { version = "0.14", optional = true }
savefile-derive = { version = "0.14", optional = true }
zstd = "0.12.3"

[features]
Expand Down
5 changes: 1 addition & 4 deletions src/datasets/log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ use crate::bench_flatbuffers;
use crate::bench_prost;
use crate::Generate;

#[cfg(feature = "savefile")]
use savefile::prelude::ReprC;

#[derive(Clone, Copy)]
#[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))]
#[cfg_attr(feature = "bitcode", derive(bitcode::Encode, bitcode::Decode))]
Expand All @@ -56,7 +53,7 @@ use savefile::prelude::ReprC;
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))]
pub struct Address {
pub x0: u8,
pub x1: u8,
Expand Down
7 changes: 2 additions & 5 deletions src/datasets/mesh/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ use crate::bench_flatbuffers;
use crate::bench_prost;
use crate::Generate;

#[cfg(feature = "savefile")]
use savefile::prelude::ReprC;

#[derive(Clone, Copy)]
#[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))]
#[cfg_attr(feature = "bitcode", derive(bitcode::Encode, bitcode::Decode))]
Expand All @@ -55,7 +52,7 @@ use savefile::prelude::ReprC;
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))]
pub struct Vector3 {
pub x: f32,
pub y: f32,
Expand Down Expand Up @@ -144,7 +141,7 @@ impl alkahest::Pack<Vector3> for Vector3 {
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))]
pub struct Triangle {
pub v0: Vector3,
pub v1: Vector3,
Expand Down
6 changes: 2 additions & 4 deletions src/datasets/minecraft_savedata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ use crate::bench_flatbuffers;
#[cfg(feature = "prost")]
use crate::bench_prost;
use crate::{generate_vec, Generate};
#[cfg(feature = "savefile")]
use savefile::prelude::ReprC;

#[derive(Clone, Copy)]
#[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))]
Expand All @@ -55,7 +53,7 @@ use savefile::prelude::ReprC;
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast)]
#[repr(u8)]
pub enum GameType {
Survival,
Expand Down Expand Up @@ -269,7 +267,7 @@ impl alkahest::Pack<ItemSchema> for &'_ Item {
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile))]
pub struct Abilities {
#[cfg_attr(feature = "bitcode", bitcode_hint(expected_range = "0.0..1.0"))]
pub walk_speed: f32,
Expand Down
4 changes: 1 addition & 3 deletions src/datasets/mk48/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ use crate::bench_flatbuffers;
#[cfg(feature = "prost")]
use crate::bench_prost;
use crate::{generate_vec, Generate};
#[cfg(feature = "savefile")]
use savefile::prelude::ReprC;

#[derive(Copy, Clone, Debug)]
#[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))]
Expand All @@ -57,7 +55,7 @@ use savefile::prelude::ReprC;
)]
#[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))]
#[cfg_attr(feature = "alkahest", derive(alkahest::Schema))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile))]
#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast)]
#[repr(u8)]
pub enum EntityType {
#[cfg_attr(feature = "bitcode", bitcode_hint(frequency = 2.14))]
Expand Down

0 comments on commit 18f6d85

Please sign in to comment.