Not sure if it's necessary to re-implement this here, or if just calling `swap()` would be okay.