When Saad bin Muaz was struck on the day of the Trench, a man shot him in the median vein of his arm. So the Messenger of Allah ﷺ pitched a tent for him in the mosque so that he could visit him from nearby.
حدثنا عثمان بن أبي شيبة حدثنا عبد الله بن نمير عن هشام بن عروة عن أبيه
لما أصيب سعد بن معاذ يوم الخندق رماه رجل في الأكحل فضرب عليه رسول الله ﷺ خيمة في المسجد ليعوده من قريب
Bukhari narrated it in the Book of Prayer, chapter on setting up a tent in the masjid for the sick and others, no. 463, and Muslim narrated it in the Book of Jihad and Expeditions, chapter on the permissibility of fighting one who breaks the covenant, etc., no. 1769, from the hadith of Ibn Numayr, in a longer form.