Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow span macro to accept a bare expression #61

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

joshka
Copy link
Member

@joshka joshka commented Jul 22, 2024

This makes it possible to pass an expression directly to the span!
macro, which will be formatted into the display representation of the
expression using the format! macro.

let number = 123;
let test = "test";
span!(number);
span!(test);

This makes it possible to pass an expression directly to the `span!`
macro, which will be formatted into the display representation of the
expression using the `format!` macro.

```rust
let number = 123;
let test = "test";
span!(number);
span!(test);
```
@kdheepak kdheepak merged commit d0f75eb into main Jul 22, 2024
3 checks passed
@kdheepak kdheepak deleted the jm/format-expression branch July 22, 2024 09:36
@github-actions github-actions bot mentioned this pull request Jul 22, 2024
joshka pushed a commit that referenced this pull request Jul 22, 2024
## 🤖 New release
* `ratatui-macros`: 0.4.2 -> 0.4.3

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.4.3](v0.4.2...v0.4.3)
- 2024-07-22

### Added
- allow span macro to accept a bare expression
([#61](#61))

### Other
- *(deps)* bump trybuild from 1.0.96 to 1.0.97 in the cargo-dependencies
group ([#59](#59))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants