rust-si icon indicating copy to clipboard operation
rust-si copied to clipboard

Int parsing doesn't work on windows?

Open What42Pizza opened this issue 1 year ago • 4 comments

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

What42Pizza avatar Mar 05 '24 20:03 What42Pizza

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

oli-obk avatar Mar 05 '24 21:03 oli-obk

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(),

What42Pizza avatar Mar 05 '24 21:03 What42Pizza

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

oli-obk avatar Mar 05 '24 22:03 oli-obk

okay nvm I give up

What42Pizza avatar Mar 05 '24 23:03 What42Pizza