I recall a story about someone at a government contractor who did a major refactoring and removed thousands of lines of code from a project, increasing its performance, only to be told by management that they'd signed a contract that said the company got paid by lines of code delivered, and his improvement would cost them tens of thousands of dollars, so revert the whole thing.
Realistically, it would take some compile time conditionals in a bunch of places to get rid of the dependencies. The best part, you'll get paid for all those #ifdefs, whens and #[cfg()]s! You can even split longer functions to be able to wrap each one of them in those conditionals! Where do I sign up?
That's a pretty bad breakdown in communication- the manager should have communicated how the contractor was paid and the programmer should have spent their time working in line with that - whichever end that breakdown happened on that sounds like that led to an awful lot of misery and wasted time - ouch
> That's a pretty bad breakdown in communication- the manager should have communicated how the contractor was paid and the programmer should have spent their time working in line with that