In survival mode, If you ride a saddled pig and use a carrot on a stick the durability will go down some, but if you take the carrot on a stick out of your inventory its durability will reset to as if it wasn't used, and if you give yourself a damaged carrot on a stick and use it while riding a pig, and take it out of your inventory, its damage will reset to whatever its damage was before it was used.
confirmed