In the States, I think we would be more inclined to say " ... so I didn't have to (study/prepare) for it last night after all!".
That brings up another issue I had in mind. I remember that once upon a time ESL books presented "needn't have + past participle" as the exclusive form to express that, even if unnecessary, the action was performed, while "didn't need to" (or "didn't have to") was said to be used to express that, being unnecessary, the action was not performed. Nowadays, both "needn't have + pp" and "didn't need to" (or "didn't have to") can be used to express the former idea, as explained in this site.