Merge `swap` usage into a single method call.