rusoto/s3sink: Don't use mem::replace() for a simple assignment

The return value of mem::replace() would be the old value but we don't
really need that here, so simply do an assignment instead.
This commit is contained in:
Sebastian Dröge 2020-05-08 14:08:08 +03:00 committed by Sebastian Dröge
parent d4e9a56e54
commit 56962b1273

View file

@ -447,7 +447,7 @@ impl ObjectImpl for S3Sink {
.unwrap(); .unwrap();
if settings.region != region { if settings.region != region {
let mut client = self.client.lock().unwrap(); let mut client = self.client.lock().unwrap();
std::mem::replace(&mut *client, S3Client::new(region.clone())); *client = S3Client::new(region.clone());
settings.region = region; settings.region = region;
} }
} }