Imaam Shaafi‘ee (rahimahullah) once mentioned the following:
True ‘Ilm creates steadfastness upon Deen, and the outcome of steadfastness upon Deen is that one will be safeguarded (from falling into sin and wrong). True abstinence of the world creates contentment, and the outcome of contentment is that one will enjoy peace and comfort. True sabr creates determination, and the outcome of determination is that one will eventually reach his goal. The ability to carry out righteous deeds is in actual fact the taufeeq of Allah Ta‘ala, and the outcome of taufeeq is that one will be successful (in acquiring the pleasure of Allah Ta‘ala and Jannah), and every good by Allah Ta‘ala is based on truthfulness.
(Siyar A’laam min Nubalaa vol. 8 pg. 393)