he asked the Messenger of Allah about fasting while traveling. He said: "If," then he said something to the effect that: "If you want, then fast, and if you want, then do not fast.
أَنَّهُ سَأَلَ رَسُولَ اللَّهِ ﷺ عَنِ الصَّوْمِ فِي السَّفَرِ قَالَ إِنْ ثُمَّ ذَكَرَ كَلِمَةً مَعْنَاهَا إِنْ شِئْتَ صُمْتَ وَإِنْ شِئْتَ أَفْطَرْتَ