reformatting/reordering

This commit is contained in:
Lynne Megido 2021-04-20 15:20:10 +10:00
parent 83091c754d
commit dc2ac7b002
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
5 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,9 @@
use std::path::Path;
use crate::string_type::String;
use mime_guess::Mime;
use crate::inspectors::mime_extension_lookup;
use crate::string_type::String;
/// Information about a scanned file.
pub struct Findings<'a> {

View File

@ -1,5 +1,6 @@
//! The various formats that [fif](crate) can output to.
use std::ffi::OsStr;
use std::io::{self, Write};
#[cfg(unix)]
use std::os::unix::ffi::OsStrExt;
@ -9,7 +10,6 @@ use snailquote::escape;
use crate::scan_error::ScanError;
use crate::{Findings, BACKEND};
use std::ffi::OsStr;
/// The current version of fif, as defined in Cargo.toml.
const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");

View File

@ -91,8 +91,6 @@ cached! {
}
}
match exts {
Some(exts) => {
let possible_exts: Vec<String> = exts.iter().map(|e| String::from(*e)).collect();

View File

@ -17,11 +17,14 @@
#![forbid(unsafe_code)]
#![warn(trivial_casts, unused_lifetimes, unused_qualifications)]
use std::ffi::OsStr;
use std::io::{stdout, BufWriter};
use std::path::Path;
use std::process::exit;
use cfg_if::cfg_if;
use clap::Clap;
use env_logger::Env;
use log::{debug, error, info, trace, warn};
use once_cell::sync::OnceCell;
#[cfg(feature = "multi-threaded")]
@ -33,9 +36,6 @@ use crate::formats::{Format, PowerShell, Shell};
use crate::mime_db::MimeDb;
use crate::parameters::{OutputFormat, ScanOpts};
use crate::scan_error::ScanError;
use env_logger::Env;
use std::ffi::OsStr;
use std::process::exit;
mod extension_set;
mod findings;

View File

@ -192,7 +192,7 @@ fn argument_parsing() {
ScanOpts {
hidden: false,
extensionless: false,
follow_symlinks: true
follow_symlinks: true,
},
"ScanOpts are incorrect"
)