Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gnatolf
3 months ago
|
parent
|
context
|
favorite
| on:
Let's write a macro in Rust
If only one could construct a macro to solve the boilerplate of AsRef<str> etc ;)
LtdJorge
3 months ago
[–]
To me, there’s not much difference between:
fn foo(name: &str) {}
and*:
fn foo(name: impl AsRef<str>) {}
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: