Commit f6c1db60 authored by Luke Sandberg's avatar Luke Sandberg

Sort and filter all collections when encoding

Also sort the lazy field vec itself.

This should make tasks more consistent, deterministic and thus compressible.
parent ead95dfb
......@@ -35,7 +35,7 @@ macro_rules! transient_traits {
};
}
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Encode, Decode)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Encode, Decode)]
pub struct CellRef {
pub task: TaskId,
pub cell: CellId,
......@@ -48,7 +48,7 @@ impl CellRef {
}
}
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Encode, Decode)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Encode, Decode)]
pub struct CollectibleRef {
pub collectible_type: TraitTypeId,
pub cell: CellRef,
......@@ -61,7 +61,7 @@ impl CollectibleRef {
}
}
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Encode, Decode)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Encode, Decode)]
pub struct CollectiblesRef {
pub task: TaskId,
pub collectible_type: TraitTypeId,
......
......@@ -37,7 +37,9 @@ pub enum ResolveTypeError {
ReadError { source: anyhow::Error },
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, Encode, Decode)]
#[derive(
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, Encode, Decode,
)]
pub struct CellId {
pub type_id: ValueTypeId,
pub index: u32,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment