1/2″ to 7/8″ – 1/2″ USA toilet tank inlet connector replacement

How to replace USA toilet fill valve connector?