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 21:18:43 +08:00 committed by GitHub
parent bdd64cc9d3
commit 0715e6defc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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].");
}