HN user

curious145454

17 karma
Posts0
Comments6
View on HN
No posts found.
Rust 1.64.0 4 years ago

Apparently, there's another meaning to word "simpler", of which I'm unaware :D

Rust 1.64.0 4 years ago

This takes a bit more code to implement, but provides a simpler API for users.

I fail to see how hiding self.send() inside of IntoFuture makes anything simpler.

StorageRequest::new().set_debug(true).send().await?;

vs

StorageRequest::new().set_debug(true).await?;

Just reading the later variant makes me wonder "What are we (a)waiting for here? For set_debug to succeed?". I'd definitely stick to the former variant.

Perhaps, it's just not the best example and there are better usages than the one chosen to illustrate it.