lint tests
This commit is contained in:
parent
e404d144a2
commit
1152f775b9
2 changed files with 6 additions and 4 deletions
4
src/cache/disk.rs
vendored
4
src/cache/disk.rs
vendored
|
@ -462,7 +462,7 @@ mod remove_file_handler {
|
|||
use tempfile::tempdir;
|
||||
use tokio::fs::{create_dir_all, remove_dir_all};
|
||||
|
||||
use super::{File, remove_file_handler};
|
||||
use super::{remove_file_handler, File};
|
||||
|
||||
#[tokio::test]
|
||||
async fn should_not_panic_on_invalid_path() {
|
||||
|
@ -568,7 +568,7 @@ mod db {
|
|||
use sqlx::{Connection, Row, SqliteConnection};
|
||||
use std::error::Error;
|
||||
|
||||
use super::{Cache, ConnectOptions, DiskCache, FromStr, Ordering, PathBuf, StreamExt, handle_db_get, handle_db_put};
|
||||
use super::{handle_db_get, handle_db_put, DiskCache, FromStr, Ordering, PathBuf, StreamExt};
|
||||
|
||||
#[tokio::test]
|
||||
#[cfg_attr(miri, ignore)]
|
||||
|
|
6
src/cache/fs.rs
vendored
6
src/cache/fs.rs
vendored
|
@ -469,7 +469,10 @@ mod read_file_compat {
|
|||
mod metadata_future {
|
||||
use std::{collections::VecDeque, io::ErrorKind};
|
||||
|
||||
use super::{AsyncBufRead, AsyncRead, AsyncReadExt, BufReader, Context, Error, MetadataFuture, NewCipher, Pin, Poll, ReadBuf};
|
||||
use super::{
|
||||
AsyncBufRead, AsyncRead, AsyncReadExt, BufReader, Context, Error, MetadataFuture, Pin,
|
||||
Poll, ReadBuf,
|
||||
};
|
||||
use crate::cache::ImageContentType;
|
||||
use chrono::DateTime;
|
||||
|
||||
|
@ -519,7 +522,6 @@ mod metadata_future {
|
|||
match pinned.fill_buf_events.pop_front() {
|
||||
Some(Poll::Ready(Ok(bytes))) => {
|
||||
pinned.buffer.extend_from_slice(bytes);
|
||||
String::from_utf8_lossy(&pinned.buffer);
|
||||
return Poll::Ready(Ok(pinned.buffer.as_ref()));
|
||||
}
|
||||
Some(res @ Poll::Ready(_)) => res,
|
||||
|
|
Loading…
Reference in a new issue