mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
Fix deserialization of arenas
This commit is contained in:
parent
0feea58a34
commit
1907a92928
@ -125,16 +125,13 @@ impl<T> Iterator for Range<T> {
|
||||
/// The arena can be indexed using the given handle to obtain
|
||||
/// a reference to the stored item.
|
||||
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
|
||||
#[cfg_attr(
|
||||
any(feature = "serialize", feature = "deserialize"),
|
||||
serde(transparent)
|
||||
)]
|
||||
#[cfg_attr(feature = "serialize", serde(transparent))]
|
||||
#[cfg_attr(test, derive(PartialEq))]
|
||||
pub struct Arena<T> {
|
||||
/// Values of this arena.
|
||||
data: Vec<T>,
|
||||
#[cfg(feature = "span")]
|
||||
#[cfg_attr(any(feature = "serialize", feature = "deserialize"), serde(skip))]
|
||||
#[cfg_attr(feature = "serialize", serde(skip))]
|
||||
span_info: Vec<Span>,
|
||||
}
|
||||
|
||||
|
@ -4,14 +4,11 @@ use std::ops::{Deref, DerefMut, RangeBounds};
|
||||
/// A code block is a vector of statements, with maybe a vector of spans.
|
||||
#[derive(Debug, Clone, Default)]
|
||||
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
|
||||
#[cfg_attr(
|
||||
any(feature = "serialize", feature = "deserialize"),
|
||||
serde(transparent)
|
||||
)]
|
||||
#[cfg_attr(feature = "serialize", serde(transparent))]
|
||||
pub struct Block {
|
||||
body: Vec<Statement>,
|
||||
#[cfg(feature = "span")]
|
||||
#[cfg_attr(any(feature = "serialize", feature = "deserialize"), serde(skip))]
|
||||
#[cfg_attr(feature = "serialize", serde(skip))]
|
||||
span_info: Vec<Span>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user