Your approach to day4 was a tad wordier than mine but seems to have been similar. I'm trying to do your thing of not panic!()ing etc. It has been instructive in error propagation for me :-D
git.gitano.org.uk/personal/d⦠if you're interested :-)
1
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. :-)
1
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 :-)
1
1
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?
1
I don't think you need a proc macro actually! I think just implementing a serde deserialzer would be pretty great!
1
Clever! I decided to hack a direct proc_macro approach and came up with git.gitano.org.uk/parsebyreg⦠which is horrific in all senses, but does work for me, moderately complicatedly. It'd need serious refactorage before it could be primetime though.
Dec 5, 2018 Β· 12:00 AM UTC
1
1


