Stream: general

Topic: Is there a `try!(..) to ..?` conversion script


Luca Barbato (Sep 06 2019 at 10:02, on Zulip):

And in general is there a ready to use tool to do such transformations?

Laurențiu Nicola (Sep 06 2019 at 11:51, on Zulip):

I thought cargo fix would do it, but it prefers r#try! instead

lqd (Sep 06 2019 at 12:45, on Zulip):

I think it's supposed to be handled by rustfmt and the use_try_shorthand option

Taylor Cramer (Sep 06 2019 at 18:44, on Zulip):

@Luca Barbato https://github.com/japaric-archived/untry also exists

Luca Barbato (Sep 07 2019 at 10:38, on Zulip):

thank you a lot :)

nagisa (Sep 07 2019 at 15:48, on Zulip):

The conversion isn’t always equivalent so cargo fix cannot apply that without breaking code. And not breaking code is its primary requirement.

Tshepang Lekhonkhobe (Sep 08 2019 at 20:34, on Zulip):

this post really make pre-mir borrowck look bad

Last update: Nov 22 2019 at 00:10UTC