Improve struct formatting used as a parameter in a function call