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

Asserts in release code #6

Closed
tkcl81 opened this issue Feb 6, 2024 · 1 comment
Closed

Asserts in release code #6

tkcl81 opened this issue Feb 6, 2024 · 1 comment

Comments

@tkcl81
Copy link

tkcl81 commented Feb 6, 2024

Hi, thanks for your work! There are some asserts which prevent proper error handling when using your crate. Could you please drop them or turn into debug_assert? Thanks!

            let slice = &src[slice_start_index..current_index];
            assert_eq!(slice, "}", "[Lexer] Invalid last char, should be '}}'");
            if slice != "}" {
                return Err(LexerError::InvalidLastChar);
            }
@d0rianb
Copy link
Owner

d0rianb commented Feb 7, 2024

Fixed in #4

@d0rianb d0rianb closed this as completed Feb 7, 2024
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

No branches or pull requests

2 participants