From 0a5932a6fe7f34981fc0c800e43417619ff6255c Mon Sep 17 00:00:00 2001 From: veeso Date: Mon, 14 Oct 2024 09:32:26 +0200 Subject: [PATCH] fix: macros were not usable from external crates since the `tuirealm::` namespace of the recursive macro was not specified --- CHANGELOG.md | 7 +++++++ Cargo.toml | 2 +- README.md | 2 +- examples/user_events/user_events.rs | 4 ++++ src/macros.rs | 6 +++--- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38cd2e1..58a6257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog - [Changelog](#changelog) + - [2.0.3](#203) - [2.0.2](#202) - [2.0.1](#201) - [2.0.0](#200) @@ -38,6 +39,12 @@ --- +## 2.0.3 + +Released on 14/10/2024 + +- Fixed: macros were not usable from external crates since the `tuirealm::` namespace of the recursive macro was not specified + ## 2.0.2 Released on 14/10/2024 diff --git a/Cargo.toml b/Cargo.toml index 205d1f7..7be071a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tuirealm" -version = "2.0.2" +version = "2.0.3" authors = ["Christian Visintin"] edition = "2021" categories = ["command-line-utilities"] diff --git a/README.md b/README.md index 1fee0fa..fc5e3f4 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

Developed by @veeso

-

Current version: 2.0.2 (14/10/2024)

+

Current version: 2.0.3 (14/10/2024)

= Application::init(event_listener); + let _clause = tuirealm::subclause_and!(Id::Label, Id::Other); + let _clause = tuirealm::subclause_or!(Id::Label, Id::Other); + let _clause = tuirealm::subclause_and_not!(Id::Label, Id::Other, Id::Label); + // subscribe component to clause app.mount( Id::Label, diff --git a/src/macros.rs b/src/macros.rs index 9f533bc..1d1db79 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -39,7 +39,7 @@ macro_rules! subclause_and { ($id:expr, $($rest:expr),+) => { SubClause::and( SubClause::IsMounted($id), - subclause_and!($($rest),+) + tuirealm::subclause_and!($($rest),+) ) }; } @@ -91,7 +91,7 @@ macro_rules! subclause_and_not { ($id:expr, $($rest:expr),+) => { SubClause::and( SubClause::not(SubClause::IsMounted($id)), - subclause_and_not!($($rest),+) + tuirealm::subclause_and_not!($($rest),+) ) }; } @@ -137,7 +137,7 @@ macro_rules! subclause_or { ($id:expr, $($rest:expr),+) => { SubClause::or( SubClause::IsMounted($id), - subclause_or!($($rest),+) + tuirealm::subclause_or!($($rest),+) ) }; }