Jābir (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) during his journey in the year of the Conquest of Makkah in Ramadan, he saw people crowded together, and a man was lying down and being shaded by the crowd, as it reported in the narration of Ibn Jarīr. So, the Prophet (may Allah's peace and blessings be upon him) asked them about that man. They told him that he was fasting and reached such a state of thirst that he needed to lie down. So, the Prophet (may Allah's peace and blessings be upon him) said that one's fasting when traveling is not from righteousness, rather Muslims should take advantage of the concessions that Allah has granted them. Allah does not want us to punish ourselves by performing acts of worship.