Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JustForShow] try!() -> ? #2497

Closed
wants to merge 1 commit into from
Closed

[JustForShow] try!() -> ? #2497

wants to merge 1 commit into from

Conversation

japaric
Copy link
Member

@japaric japaric commented Mar 18, 2016

Mostly automated conversion of try!()s to ?s using untry.

Before this PR:

$ grep 'try!' **/*.rs | wc
    817    3725   70811

After this PR:

$ grep 'try!' **/*.rs | wc
    213     996   18925

cc @alexcrichton

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

cc @rust-lang/lang

This looked pretty awesome to me, I really liked how it reduced the visual clutter and you could basically much more directly see what's going on. Essentially the small trailing ? is just an implementation detail to get the types to match up

@japaric
Copy link
Member Author

japaric commented Mar 21, 2016

Closing this since we can't use unstable features in Cargo. rust-lang/rust#32390 is another example of a large try! -> ? conversion.

@japaric japaric closed this Mar 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants