On 07/12/2013 00:12, Gaetan wrote:
I am in favor of two version of the api: from_str which has already done
the unwrap, and a from_str_safe for instance that returns a Result or
option.

This is what we have now. (Eg. from_utf8() and from_utf8_opt())

The point of my initial email was to argue against this. I think we should try to avoid doubling the amount of API.


Or perhaps allow the propagation of Option/Result.

This is why we have methods like .map() and .and_then()

--
Simon Sapin
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to