From 56962b127370832efff5757722ce13437768fcc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 8 May 2020 14:08:08 +0300 Subject: [PATCH] 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. --- net/rusoto/src/s3sink.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rusoto/src/s3sink.rs b/net/rusoto/src/s3sink.rs index 0bdb2f07..d69adc70 100644 --- a/net/rusoto/src/s3sink.rs +++ b/net/rusoto/src/s3sink.rs @@ -447,7 +447,7 @@ impl ObjectImpl for S3Sink { .unwrap(); if settings.region != region { let mut client = self.client.lock().unwrap(); - std::mem::replace(&mut *client, S3Client::new(region.clone())); + *client = S3Client::new(region.clone()); settings.region = region; } }