Yahya related to me from Malik from Abd arRahman ibn Harmala that a man asked Said ibn al-Musayyab about what a man who was junub and had done tayammum should do when he came across water. Said said, "When he comes across water he must do ghusl for what comes after". Malik said about some one who had a wet dream while he was on a journey and there was only enough water for wudu and he was not thirsty and so he did not need to use it for that, "Let him wash his genitals, and whatever the semen has fallen on, with the water and then he does tayammum with good earth as Allah has ordered him". Malik was asked whether a man who was junub and wished to do tayammum but could only find salty earth could do tayammum with that earth, and whether it was disapproved of to pray on salty earth. He said, "There is no harm in praying on salty earth or in using it to do tayammum, because Allah the Blessed and Exalted has said, '.and do tayammum with good earth'. One is purified by tayammum with everything that is earth, whether it is salty or otherwise".
This hadith teaches us about the importance of cleanliness in Islam as well as how we can still remain pure even without access to clean drinking water through performing tayamumm instead. It also shows us how important it is for us to make use of whatever resources we have at our disposal in order to stay close to Allah even during difficult times such as being on long journeys where access to clean drinking may be limited or unavailable altogether.