Skip to content

Commit

Permalink
fix compilation when serialization is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sebcrozet committed Apr 28, 2024
1 parent 735d1df commit 6ec6632
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions src/shape/heightfield2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ use crate::math::{Real, Vector};

use crate::shape::Segment;

/// Indicates if a cell of an heightfield is removed or not. Set this to `false` for
/// Indicates if a cell of a heightfield is removed or not. Set this to `false` for
/// a removed cell.
pub type HeightFieldCellStatus = bool;

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Deserialize, rkyv::Serialize),
archive(check_bytes)
)]
// TODO: Archive isn’t implemented for VecStorage yet.
// #[cfg_attr(
// feature = "rkyv",
// derive(rkyv::Archive, rkyv::Deserialize, rkyv::Serialize),
// archive(check_bytes)
// )]
#[derive(Debug, Clone)]
#[repr(C)]
/// A 2D heightfield with a generic storage buffer for its heights.
Expand Down
11 changes: 6 additions & 5 deletions src/shape/heightfield3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ bitflags::bitflags! {
}

#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(
feature = "rkyv",
derive(rkyv::Archive, rkyv::Deserialize, rkyv::Serialize),
archive(check_bytes)
)]
// TODO: Archive isn’t implemented for VecStorage yet.
// #[cfg_attr(
// feature = "rkyv",
// derive(rkyv::Archive, rkyv::Deserialize, rkyv::Serialize),
// archive(check_bytes)
// )]
#[derive(Debug, Clone)]
#[repr(C)]
/// A 3D heightfield.
Expand Down

0 comments on commit 6ec6632

Please sign in to comment.