correctly format struct literal elements