From c089e44b59b69bb31f198e231ef7b8d6b30f9ba1 Mon Sep 17 00:00:00 2001 From: phiresky Date: Fri, 6 Jan 2023 17:35:56 +0530 Subject: [PATCH] cargo fix --- src/adapters/sqlite.rs | 2 +- src/adapters/zip.rs | 4 ++-- src/test_utils.rs | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/adapters/sqlite.rs b/src/adapters/sqlite.rs index d290242..aaac120 100644 --- a/src/adapters/sqlite.rs +++ b/src/adapters/sqlite.rs @@ -147,7 +147,7 @@ mod test { use super::*; use crate::test_utils::*; use pretty_assertions::assert_eq; - use tokio::fs::File; + #[tokio::test] async fn simple() -> Result<()> { diff --git a/src/adapters/zip.rs b/src/adapters/zip.rs index cedda58..8d4f848 100644 --- a/src/adapters/zip.rs +++ b/src/adapters/zip.rs @@ -182,7 +182,7 @@ impl<'a> AdaptedFilesIter for ZipAdaptIter<'a> { #[cfg(test)] mod test { use async_zip::{write::ZipFileWriter, Compression, ZipEntryBuilder}; - use tokio::fs::File; + use super::*; use crate::{preproc::loop_adapt, test_utils::*}; @@ -213,7 +213,7 @@ mod test { async fn only_seek_zip_fs() -> Result<()> { let zip = test_data_dir().join("only-seek-zip.zip"); let (a, d) = simple_fs_adapt_info(&zip).await?; - let v = adapted_to_vec(loop_adapt(&ZipAdapter::new(), d, a)?).await?; + let _v = adapted_to_vec(loop_adapt(&ZipAdapter::new(), d, a)?).await?; // assert_eq!(String::from_utf8(v)?, ""); Ok(()) diff --git a/src/test_utils.rs b/src/test_utils.rs index 98b0ae8..8518a91 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -9,10 +9,7 @@ use crate::{ recurse::concat_read_streams, }; use anyhow::Result; -use std::{ - ffi::OsStr, - path::{Path, PathBuf}, -}; +use std::path::{Path, PathBuf}; use tokio::{fs::File, io::AsyncReadExt}; pub use pretty_assertions::{assert_eq, assert_ne}; @@ -69,6 +66,5 @@ pub fn poppler_adapter() -> CustomSpawningFileAdapter { .find(|e| e.name == "poppler") .expect("no poppler adapter"); - let adapter = adapter.to_adapter(); - adapter + adapter.to_adapter() }