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

t! macro can be replaced by '?' operator #60580

Closed
frewsxcv opened this issue May 6, 2019 · 1 comment · Fixed by #60581
Closed

t! macro can be replaced by '?' operator #60580

frewsxcv opened this issue May 6, 2019 · 1 comment · Fixed by #60581
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@frewsxcv
Copy link
Member

frewsxcv commented May 6, 2019

This file defines a t! macro, but it seems like we can remove that macro and just use the new ? unary operator instead.

macro_rules! t {
($e:expr) => (match $e {
Ok(e) => e,
Err(e) => return e,
})
}

There might be other files with a t! macro defined.

@frewsxcv frewsxcv added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. C-cleanup Category: PRs that clean code up or issues documenting cleanup. labels May 6, 2019
@jonas-schievink jonas-schievink added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label May 6, 2019
@mati865
Copy link
Contributor

mati865 commented May 10, 2019

#37939 probably should be fixed first

hellow554 added a commit to hellow554/rust that referenced this issue May 14, 2019
Centril added a commit to Centril/rust that referenced this issue May 21, 2019
Centril added a commit to Centril/rust that referenced this issue May 21, 2019
Centril added a commit to Centril/rust that referenced this issue May 21, 2019
Centril added a commit to Centril/rust that referenced this issue May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants