2 ms·
Has anyone any idea where the `` format strings come from?? As far as I know rust doesn't have them. And as far as I know if rust gets format strings it most
by dathinab 5y ago
Has anyone any idea where the `` format strings come from??
As far as I know rust doesn't have them.
And as far as I know if rust gets format strings it most likely get
them in form of a `f` prefix (like raw strings have an `r` prefix and binary strings have a `b` prefix).
Is it just a thing to make the code more readable/shorter on the web?
- michalhosna 5y agoIf you are talking about "Here is an example of a complete workload that measures performance of selecting rows by random keys", then you are looking at Rune code rather than Rust code. See https://rune-rs.github.io/book/template_literals.html https://rune-rs.github.io/book/template_literals.html
- metabagel 5y agoMarkdown uses backticks around code. https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-code https://docs.github.com/en/github/writing-on-github/getting-...
- mkl 5y agoHN doesn't use Markdown.
- cdirkx 5y agoThe code shown in the article isn't Rust, but Rune [0], which has similar syntax, but is a dynamic scripting language. It has template literals [1]. [0] https://rune-rs.github.io/ https://rune-rs.github.io/ [1] https://rune-rs.github.io/book/template_literals.html https://rune-rs.github.io/book/template_literals.html
- dathinab 5y agoOh, that makes sense.