Closed Kobzol closed 2 years ago
I think this looks pretty good, so happy to merge with the nit fixed.
I refactored the while let
. VecDeque
probably isn't strictly necessary, but it shouldn't hurt anything.
I don't have a way to test the change properly though, we'll probably have to see how it works in production.
The code now builds a queue of unresolved commits (pre-filled with a newly received commit and all missing commits from the DB). Then it recursively resolves each commit from the queue. When a new unresolved commit is found during the resolve, it is added to the queue.
Fixes: https://github.com/rust-lang/triagebot/issues/1483