The Prophet ﷺ set out from Medina toward Mecca, and when he reached Usfan he called for a vessel and raised it to his mouth to show the people, and this was during Ramadan.Ibn Abbas used to say, "The Prophet ﷺ both fasted and broke his fast, so whoever wishes may fast and whoever wishes may break his fast."
حدثنا مسدد حدثنا أبو عوانة عن منصور عن مجاهد عن طاوس
خرج النبي ﷺ من المدينة إلى مكة حتى بلغ عسفان ثم دعا بإناء فرفعه إلى فيه ليريه الناس وذلك في رمضان فكان ابن عباس يقول قد صام النبي ﷺ وأفطر فمن شاء صام ومن شاء أفطر
This was narrated by Bukhari in the Book of Fasting, Chapter: One Who Breaks His Fast While Traveling So That People May See Him, hadith no. 1948, from the hadith of Abu Awana Al-Waddah, and by Muslim in the Book of Fasting, Chapter: The Permissibility of Fasting and Breaking the Fast in the Month of Ramadan for the Traveler, etc., hadith no. 1113, from the hadith of Mansur, with the same wording, without sin.