If you pay the full amount you owe, you haven't broken anything. In fact, the landlord can't rent the place out for the time you have paid for, even though you aren't living there. If they move someone in for part of the time the place is yours, they must refund the prorated amount.
I say this on the assumption you understand landlord-tenant law. If you fail to give proper notice and pay until the end of that month and no more, than you HAVE broken the lease. For example, you live in a state with a 30 day notice. You move out today and have paid until the end of August. You owe for all of September, so you have to pay that, too. If you told the landlord today and gave them back the keys today, maybe they could have someone in by September 1st, and then you wouldn't owe September rent.
Your credit will only be affected if you are sued for unpaid rent and lose and a judgment is entered against you.