From 083e6ae85c195d89b19a2c38ee280943a5626512 Mon Sep 17 00:00:00 2001 From: kinire98 Date: Mon, 12 Feb 2024 17:48:49 +0100 Subject: [PATCH] Fixed clippy warning --- Cargo.toml | 2 +- src/linkto.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4c2481f..dc1489a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ name = "benchmarks" harness = false [features] -default = ["async-std", "mmap"] +default = ["async-std", "mmap", "link_to"] mmap = ["memmap2", "libc"] async-std = ["dep:async-std", "futures"] link_to = [] diff --git a/src/linkto.rs b/src/linkto.rs index 9f7f877..62feb0f 100644 --- a/src/linkto.rs +++ b/src/linkto.rs @@ -1,5 +1,7 @@ #[cfg(any(feature = "async-std", feature = "tokio"))] use crate::async_lib::AsyncRead; +#[cfg(any(feature = "async-std", feature = "tokio"))] +use crate::async_lib::AsyncReadExt; use crate::content::linkto; use crate::errors::{Error, IoErrorExt, Result}; use crate::{index, WriteOpts}; @@ -11,11 +13,6 @@ use std::pin::Pin; #[cfg(any(feature = "async-std", feature = "tokio"))] use std::task::{Context as TaskContext, Poll}; -#[cfg(feature = "async-std")] -use futures::io::AsyncReadExt; -#[cfg(feature = "tokio")] -use tokio::io::AsyncReadExt; - const BUF_SIZE: usize = 16 * 1024; const PROBE_SIZE: usize = 8;