Skip to content

Commit

Permalink
fix: macros were not usable from external crates since the `tuirealm:…
Browse files Browse the repository at this point in the history
…:` namespace of the recursive macro was not specified
  • Loading branch information
veeso committed Oct 14, 2024
1 parent 8f65b88 commit 0a5932a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

- [Changelog](#changelog)
- [2.0.3](#203)
- [2.0.2](#202)
- [2.0.1](#201)
- [2.0.0](#200)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tuirealm"
version = "2.0.2"
version = "2.0.3"
authors = ["Christian Visintin"]
edition = "2021"
categories = ["command-line-utilities"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</p>

<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
<p align="center">Current version: 2.0.2 (14/10/2024)</p>
<p align="center">Current version: 2.0.3 (14/10/2024)</p>

<p align="center">
<a href="https://opensource.org/licenses/MIT"
Expand Down
4 changes: 4 additions & 0 deletions examples/user_events/user_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ fn main() {

let mut app: Application<Id, Msg, UserEvent> = 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,
Expand Down
6 changes: 3 additions & 3 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ macro_rules! subclause_and {
($id:expr, $($rest:expr),+) => {
SubClause::and(
SubClause::IsMounted($id),
subclause_and!($($rest),+)
tuirealm::subclause_and!($($rest),+)
)
};
}
Expand Down Expand Up @@ -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),+)
)
};
}
Expand Down Expand Up @@ -137,7 +137,7 @@ macro_rules! subclause_or {
($id:expr, $($rest:expr),+) => {
SubClause::or(
SubClause::IsMounted($id),
subclause_or!($($rest),+)
tuirealm::subclause_or!($($rest),+)
)
};
}

0 comments on commit 0a5932a

Please sign in to comment.