Closed matthauck closed 6 years ago
So I was reviewing this and I didn't see anything wrong, but then you added a commit and said Make it work for real
which then made me question my existence for being since I couldn't tell it wouldn't have worked. Great. Existential angst due to a PR. At any rate, I don't see anything glaringly bad/wrong but the logic is pretty rough to follow and I think I would decompose it so that the workflow portion is more readable statements vs actual bit comparisons is_approved(review)
vs review.state === 'approved'
. This is just the first one I can think of. At any rate, I can't 'see' anything wrong with it. Of course this is all based on it working...
Haha. I didn't see anything wrong in the first stab at it either. But manual testing with actual responses from github api exposed some flaws. :)
re. readability, point well taken. It is a little ugly. I really wish you could do multiple if let(...)
statements without so much needless nesting. :disappointed:. I'll see if I can improve that section a bit.
multiple if let(...) => tuples
I think.
:) .
although that can get ugly quick if you have long var names or you're calling functions.
if let (Some(a), Some(b)) = (expr X, expr Y)
It looks better. If it's working :shipit:
cool, thanks. mind re-approving?
btw. doing some manual testing right now and it's not quite working yet... :thinking: