Safwan slept in the mosque using his cloak as a pillow, and someone took it from beneath his head. He brought the thief to the Prophet ﷺ, who ordered that the thief's hand be cut off.Safwan said, "Messenger of Allah, I did not intend this. My cloak is given to him as charity."The Messenger of Allah ﷺ replied, "Why did you not do so before you brought him to me?"
حدثنا أبو بكر بن أبي شيبة حدثنا شبابة عن مالك بن أنس عن الزهري
أنه نام في المسجد وتوسد رداءه فأخذ من تحت رأسه فجاء بسارقه إلى النبي ﷺ فأمر به النبي ﷺ أن يقطع فقال صفوان يا رسول الله لم أرد هذا ردائي عليه صدقة فقال رسول الله ﷺ فهلا قبل أن تأتيني به
[Hasan] It is found in Muwatta (Yahya): 2/834, 835, and it has a hasan corroborating narration in Abu Dawud, no. 4394, and Ibn Jarud graded it sahih, no. 828.