From 7e10be145045ad03cace7bcf2cffb1a01b574126 Mon Sep 17 00:00:00 2001 From: glihm Date: Sat, 16 Dec 2023 20:28:06 -0600 Subject: [PATCH 1/2] chore: bump to 0.1.4 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 055b8a8..0e62281 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cainome" -version = "0.1.0" +version = "0.1.4" edition = "2021" [workspace] From 96e34eb24adc959ff95ab23c42db1009a6f07238 Mon Sep 17 00:00:00 2001 From: glihm Date: Sat, 16 Dec 2023 20:44:25 -0600 Subject: [PATCH 2/2] fix(parser): adjust how alias are applied to match full type --- Cargo.lock | 2 +- crates/parser/src/tokens/composite.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 08914ed..f7f5cd9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,7 +240,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cainome" -version = "0.1.0" +version = "0.1.4" dependencies = [ "cainome-cairo-serde", "cainome-parser", diff --git a/crates/parser/src/tokens/composite.rs b/crates/parser/src/tokens/composite.rs index bbed11c..37aa665 100644 --- a/crates/parser/src/tokens/composite.rs +++ b/crates/parser/src/tokens/composite.rs @@ -89,7 +89,7 @@ impl Composite { } pub fn apply_alias(&mut self, type_path: &str, alias: &str) { - if self.type_path.starts_with(type_path) { + if self.type_path_no_generic() == type_path { self.alias = Some(alias.to_string()); }