Skip to content

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

Closed
@frewsxcv

Description

@frewsxcv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions