Skip to content

Conversation

@Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Sep 21, 2023

fixes #6

@Nemo157
Copy link
Member Author

Nemo157 commented Sep 21, 2023

@dlight unfortunately try is a keyword so can't be used as a macro name, I've used try_ but do you have any other suggestions?

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8a90f93) 20.83% compared to head (a5b8886) 35.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main       #8       +/-   ##
===========================================
+ Coverage   20.83%   35.00%   +14.16%     
===========================================
  Files           1        1               
  Lines          24       20        -4     
===========================================
+ Hits            5        7        +2     
+ Misses         19       13        -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dlight
Copy link

dlight commented Sep 22, 2023

Hey, thank you for that!

Here are some ideas:

  • #[try_fn]

  • #[r#try] (not sure if this works)

But #[try_] isn't too bad!

@tipsypastels
Copy link

#[tries]? Mirrors #[throws]in that they're both indicative verbs.

@Nemo157
Copy link
Member Author

Nemo157 commented Sep 26, 2023

#[try_fn] was also suggested on discord when I asked about it there. I'm partial to that because it has good parallels with #[try_expr] that I'll add to #9 too.

@Nemo157 Nemo157 added this pull request to the merge queue Jan 10, 2024
Merged via the queue into Nullus157:main with commit c2404b4 Jan 10, 2024
@Nemo157 Nemo157 deleted the try branch January 10, 2024 21:46
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.

Add #[try] that does Ok-wrapping but doesn't remove Result from function signature

3 participants