util: remove unused `with` function

I don't see the point of this function, and there are no users.