What is Nostr?
Richard Schneeman /
npub1tjf…8266
2024-11-01 20:15:36

Richard Schneeman on Nostr: I want to provide a format! like macro that applies a specific formatting to whatever ...

I want to provide a format! like macro that applies a specific formatting to whatever **values** are provided to the macro. For example

```
format!("Meet {}", dog)
// => format!("Meet {}", custom_fmt(dog))

format!("Meet {dog}")
// => format!("Meet {}", custom_fmt(dog))

format!("Meet {dog}", dog = animal)
// => format!("Meet {dog}", dog = custom_fmt(animal))
```

It seems like this shouldn't be a novel desire, but I'm not seeing a great path forward... #rustlang
Author Public Key
npub1tjf3426t659w7x8yl44z2l948wmslmsp2pnta2gs9tp84r3rpawqfx8266