I am attempting Advent of Code this year for the first time and posting my solutions in Rust. I welcome beginner questions on the issue tracker!https://github.com/BurntSushi/advent-of-code …
Nice! But yeah, I'm really not happy at all with my day 4 answer. I think the code could be much clearer than what I wrote. But yeah, this is a really excellent opportunity to get some error handling experience. :-)
-
-
One thing I really need to get on, is naming my captures in my regular expressions. I'm bored with "cap.get(n).ok_or("what, no foo?")?.as_str()......" type stuff :-)
-
Also, do you know of any serde type thing where I could annotate a struct with a regexp with named captures of the fields, and have a derived parser for cheap?
- 8 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.