Skip to content

Commit ef60af9

Browse files
authored
Merge pull request #105 from LeagueToolkit/alan/meta-rework
feat: ltk_meta rework/reorg/etc
2 parents 98704b9 + c8af271 commit ef60af9

40 files changed

+2295
-1728
lines changed

crates/ltk_meta/src/bin_tree/mod.rs

Lines changed: 0 additions & 346 deletions
This file was deleted.

crates/ltk_meta/src/error.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use miette::Diagnostic;
22

3-
use super::property::BinPropertyKind;
3+
use super::property::Kind;
44

55
#[derive(Debug, thiserror::Error, Diagnostic)]
66
pub enum Error {
@@ -11,14 +11,19 @@ pub enum Error {
1111
#[error("Invalid '{0}' - got '{1}'")]
1212
InvalidField(&'static str, String),
1313
#[error("Invalid property kind - {0}")]
14-
InvalidPropertyTypePrimitive(#[from] num_enum::TryFromPrimitiveError<BinPropertyKind>),
14+
InvalidPropertyTypePrimitive(#[from] num_enum::TryFromPrimitiveError<Kind>),
1515
#[error("Invalid size - expected {0}, got {1} bytes")]
1616
InvalidSize(u64, u64),
1717

1818
#[error("Container type {0:?} cannot be nested!")]
19-
InvalidNesting(BinPropertyKind),
19+
InvalidNesting(Kind),
2020
#[error("Invalid map key type {0:?}, only primitive types can be used as keys.")]
21-
InvalidKeyType(BinPropertyKind),
21+
InvalidKeyType(Kind),
22+
23+
#[error("Container is empty!")]
24+
EmptyContainer,
25+
#[error("Mismatched types - expected {expected:?}, got {got:?}")]
26+
MismatchedContainerTypes { expected: Kind, got: Kind },
2227

2328
#[error(transparent)]
2429
ReaderError(#[from] ltk_io_ext::ReaderError),

0 commit comments

Comments
 (0)