According to the rule, the infinitive is used without the particle TO in conjunction with the following expressions: rather/sooner than; do + anything/nothing/everything but.
He'd sooner kill his wife than forgive her.
This device can do everything but talk.
My parents do nothing but quarrel.
The question is: Does the above rule also restrict the use of particle TO in the verbal compliment even if the main clause is "There was nothing to do"? Are the following sentences both correct? If the answer is "yes", which is the preferable usage?
There was nothing else to do but wait and see.
There was nothing else to do but to wait and see.