fix: remove empty macro usage

This commit is contained in:
Richard Custodio 2024-03-18 18:30:29 -03:00
parent 8ed62541af
commit d71e78d138
No known key found for this signature in database
GPG key ID: 95F51F46E2C6E8D7

View file

@ -64,18 +64,17 @@ macro_rules! row {
///
/// ```
/// fn view(&self) -> Element<Message> {
/// let empty = text!();
/// let simple = text!("Hello, world!");
///
/// let keyword = text!("Hello, {}", "world!");
///
/// let planet = "Earth";
/// let complex = text!("Hello, {planet}!");
/// let local_variable = text!("Hello, {planet}!");
/// // ...
/// }
/// ```
#[macro_export]
macro_rules! text {
() => (
$crate::Text::new()
);
($($arg:tt)*) => {
$crate::Text::new(format!($($arg)*))
};