Lady Aisha (may Allah be pleased with her), the wife of the Prophet (ﷺ), narrates that Hamza bin Amr Al-Aslami (may Allah be pleased with him) asked the Messenger of Allah (ﷺ): "Should I fast while traveling?" He used to fast a lot, so the Messenger of Allah (ﷺ) said: "If you wish, then fast, and if you wish, then break your fast."
Hadith Referenceالسنن المأثورة / باب صيام من أصبح جنبا / 311
Hadith Takhrijصحيح بخاری، الصوم، باب الصوم فى السفر والافطار رقم : 1943