Skip to content

Commit

Permalink
interpret literals and static_assert_size
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-spacetime committed Sep 14, 2024
1 parent 6f36ef3 commit 02917ea
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 208 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion crates/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ pub fn from_hex_pad<R: hex::FromHex<Error = hex::FromHexError>, T: AsRef<[u8]>>(
hex: T,
) -> Result<R, hex::FromHexError> {
let hex = hex.as_ref();
let hex = if hex.starts_with(b"0x") { &hex[2..] } else { hex };
let hex = if hex.starts_with(b"0x") {
&hex[2..]
} else if hex.starts_with(b"X'") {
&hex[2..hex.len()]
} else {
hex
};
hex::FromHex::from_hex(hex)
}
5 changes: 3 additions & 2 deletions crates/planner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ license-file = "LICENSE"
[dependencies]
derive_more.workspace = true
thiserror.workspace = true
spacetimedb-schema.workspace = true
spacetimedb-lib.workspace = true
spacetimedb-sats.workspace = true
spacetimedb-schema.workspace = true
spacetimedb-sql-parser.workspace = true

[dev-dependencies]
spacetimedb-core.workspace = true
spacetimedb-lib.workspace = true
spacetimedb-primitives.workspace = true
Loading

0 comments on commit 02917ea

Please sign in to comment.