4 ms·
On one hand, I agree that on the surface, this looks complex, if you don't read it. But on the other hand, just read the code. It's not complex. You drill dow
by dymk 3y ago
On one hand, I agree that on the surface, this looks complex, if you don't read it.
But on the other hand, just read the code. It's not complex.
You drill down into a tokio namespace. You make a builder object. You unwrap it. This is idiomatic Rust. It's verbose, but explicit is better than vague. There's no conditional logic. There's no weird type-fu. No macros. There's not even any parameters to supply, other than the Future to block on.
It's trivial to write a wrapper to go from chained methods a helper call.
- lenkite 3y agoThe next time a Rust fan pokes fun about Java's verbosity, I am copy-pasting that.