fix TokioRuntimeProvider bug

This commit is contained in:
XOR-op
2023-01-21 04:00:15 +08:00
committed by Benjamin Fry
parent 03af149076
commit 61884a1b2e
3 changed files with 6 additions and 11 deletions

View File

@@ -1100,7 +1100,7 @@ mod tests {
fn test_lookup_google() {
use super::testing::lookup_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime");
let handle = TokioRuntimeProvider;
let handle = TokioRuntimeProvider::new();
lookup_test::<Runtime, TokioRuntimeProvider>(ResolverConfig::google(), io_loop, handle)
}
@@ -1108,7 +1108,7 @@ mod tests {
fn test_lookup_cloudflare() {
use super::testing::lookup_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime");
let handle = TokioRuntimeProvider;
let handle = TokioRuntimeProvider::new();
lookup_test::<Runtime, TokioRuntimeProvider>(ResolverConfig::cloudflare(), io_loop, handle)
}