time: remove outdated explicitly drop call of Mutex (#7326)

This drop was firstly introduced by [#3289],
and the next line invokes `panic!`.

In [#5434], the original `panic!` was replaced
with `return Err`, so dropping it explicitly
is no longer necessary.

[#3289]: https://github.com/tokio-rs/tokio/pull/3289
[#5434]: https://github.com/tokio-rs/tokio/pull/5434
This commit is contained in:
Qi
2025-05-12 22:18:43 +09:00
committed by GitHub
parent bdd64cc9d3
commit 0715e6defc
-1
View File
@@ -251,7 +251,6 @@ cfg_test_util! {
let mut inner = self.inner.lock();
if !inner.enable_pausing {
drop(inner); // avoid poisoning the lock
return Err("`time::pause()` requires the `current_thread` Tokio runtime. \
This is the default Runtime used by `#[tokio::test].");
}