From ccecae5fdd27fa7695fd45c98ff755029a750eb7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 17 Apr 2020 13:59:14 -0700 Subject: Fix unused results from mem::replace --- src/libstd/thread/local.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/thread') diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index 29e99c0afd2..094c468a677 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -301,7 +301,7 @@ mod lazy { // value (an aliasing violation). To avoid setting the "I'm running a // destructor" flag we just use `mem::replace` which should sequence the // operations a little differently and make this safe to call. - mem::replace(&mut *ptr, Some(value)); + let _ = mem::replace(&mut *ptr, Some(value)); // After storing `Some` we want to get a reference to the contents of // what we just stored. While we could use `unwrap` here and it should -- cgit 1.4.1-3-g733a5