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

Int parsing doesn't work on windows? #48

Open
What42Pizza opened this issue Mar 5, 2024 · 4 comments
Open

Int parsing doesn't work on windows? #48

What42Pizza opened this issue Mar 5, 2024 · 4 comments

Comments

@What42Pizza
Copy link

This code crashes with this error:

let Count: usize = read!("{}\n");

thread 'main' panicked at src\main.rs:44:24:
called 'Result::unwrap()' on an 'Err' value: Parse("1\r", "__try_read_var__")

I don't submit issues very often, so please tell me if I'm doing anything wrong

@oli-obk
Copy link
Owner

oli-obk commented Mar 5, 2024

Looks like CI doesn't even run on windows 😱

Unfortunately I have not maintained this crate in years, I don't even remember how it works in detail, so unless someone comes along and reproduces your issue and fixes it, I don't think it'll get fixed in the next few years

@What42Pizza
Copy link
Author

What42Pizza commented Mar 5, 2024

Does it work if you replace line 95 in lib with this?

Some(c) => iter
	.skip_while(|ch| WHITESPACES.contains(ch))
	.take_while(|&ch| ch != c && !WHITESPACES.contains(ch))
	.collect(),

@oli-obk
Copy link
Owner

oli-obk commented Mar 5, 2024

idk, but if you try it out and it works, open a PR, i'll land it and publish a patch release

@What42Pizza
Copy link
Author

okay nvm I give up

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