NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.17k stars 300 forks source link

Clean up `std::optional` dereferencing in the queue runner #1329

Closed Ericson2314 closed 9 months ago

Ericson2314 commented 9 months ago

Instead of doing this partial operation a number of times, assert (with a comment, get a reference to the thing inside, and use that just once. (This refactor was done twice, "just once" for each time.)

Ericson2314 commented 9 months ago

This will also shrink the diff for https://github.com/NixOS/hydra/pull/1316, which is my main motivation.