about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-03-26 16:18:30 +0200
committerUrgau <urgau@numericable.fr>2023-05-10 19:36:01 +0200
commitd36e390d8176babedcf326581959958d447170cd (patch)
treeea5b730bbc57f6a0a9e3c08ddd4052755a0a7714 /library/std/src/sys
parentf7b831ac8a897273f78b9f47165cf8e54066ce4b (diff)
downloadrust-d36e390d8176babedcf326581959958d447170cd.tar.gz
rust-d36e390d8176babedcf326581959958d447170cd.zip
Remove and fix useless drop of reference
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/sgx/waitqueue/mod.rs2
-rw-r--r--library/std/src/sys/unix/fs.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/sgx/waitqueue/mod.rs b/library/std/src/sys/sgx/waitqueue/mod.rs
index 61bb11d9a6f..ca649ebd9d5 100644
--- a/library/std/src/sys/sgx/waitqueue/mod.rs
+++ b/library/std/src/sys/sgx/waitqueue/mod.rs
@@ -207,7 +207,7 @@ impl WaitQueue {
                 let mut entry_guard = entry.lock();
                 let tcs = entry_guard.tcs;
                 entry_guard.wake = true;
-                drop(entry);
+                drop(entry_guard);
                 Ok(WaitGuard { mutex_guard: Some(guard), notified_tcs: NotifiedTcs::Single(tcs) })
             } else {
                 Err(guard)
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index 22d2ae39713..09db5b11dbf 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -1210,7 +1210,7 @@ impl File {
                 // Redox doesn't appear to support `UTIME_OMIT`.
                 // ESP-IDF and HorizonOS do not support `futimens` at all and the behavior for those OS is therefore
                 // the same as for Redox.
-                drop(times);
+                let _ = times;
                 Err(io::const_io_error!(
                     io::ErrorKind::Unsupported,
                     "setting file times not supported",