mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
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:
parent
bdd64cc9d3
commit
0715e6defc
@ -251,7 +251,6 @@ cfg_test_util! {
|
|||||||
let mut inner = self.inner.lock();
|
let mut inner = self.inner.lock();
|
||||||
|
|
||||||
if !inner.enable_pausing {
|
if !inner.enable_pausing {
|
||||||
drop(inner); // avoid poisoning the lock
|
|
||||||
return Err("`time::pause()` requires the `current_thread` Tokio runtime. \
|
return Err("`time::pause()` requires the `current_thread` Tokio runtime. \
|
||||||
This is the default Runtime used by `#[tokio::test].");
|
This is the default Runtime used by `#[tokio::test].");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user