Jami` at-Tirmidhi, Book 20, Hadith 10 (Tirmidhi 1567)

Narrated Abu Hurairah:

That the Messenger of Allah (ﷺ) said: "Whoever swears and says: 'If Allah wills (Insha Allah), then he will not have broken it."