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

Passing a char or number to ok! results in a compile error #29

Open
RomanEmreis opened this issue Dec 3, 2024 · 0 comments
Open

Passing a char or number to ok! results in a compile error #29

RomanEmreis opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@RomanEmreis
Copy link
Owner

RomanEmreis commented Dec 3, 2024

The current ok! macro configuration doesn't allow the passing of the numbers or chars directly due to conflicting with the token tree arm.

let number_response = ok!(100); // compile error...
let char_response = ok!('a'); // compile error...

The workaround so far:

let n = 100;
let number_response = ok!(n);

let ch = 'a';
let char_response = ok!(ch);
@RomanEmreis RomanEmreis added this to the v1.0.0 milestone Dec 3, 2024
@RomanEmreis RomanEmreis self-assigned this Dec 3, 2024
@RomanEmreis RomanEmreis added the bug Something isn't working label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant