moved string_type mod into lib.rs
This commit is contained in:
parent
fb81f26ff5
commit
ebf2f152f0
6 changed files with 15 additions and 16 deletions
|
@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
|
||||||
use mime::Mime;
|
use mime::Mime;
|
||||||
|
|
||||||
use crate::inspectors::mime_extension_lookup;
|
use crate::inspectors::mime_extension_lookup;
|
||||||
use crate::string_type::String;
|
use crate::String;
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
use serde::{ser::SerializeStruct, Serializer};
|
use serde::{ser::SerializeStruct, Serializer};
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::str::FromStr;
|
||||||
use cached::cached;
|
use cached::cached;
|
||||||
use mime::Mime;
|
use mime::Mime;
|
||||||
|
|
||||||
use crate::string_type::String;
|
use crate::String;
|
||||||
use crate::MimeDb;
|
use crate::MimeDb;
|
||||||
|
|
||||||
/// The number of bytes to read initially.
|
/// The number of bytes to read initially.
|
||||||
|
|
12
src/lib.rs
12
src/lib.rs
|
@ -7,14 +7,24 @@ pub mod formats;
|
||||||
pub mod inspectors;
|
pub mod inspectors;
|
||||||
pub mod mime_db;
|
pub mod mime_db;
|
||||||
pub mod parameters;
|
pub mod parameters;
|
||||||
pub mod string_type;
|
|
||||||
pub mod utils;
|
pub mod utils;
|
||||||
|
|
||||||
use crate::findings::Findings;
|
use crate::findings::Findings;
|
||||||
use crate::mime_db::MimeDb;
|
use crate::mime_db::MimeDb;
|
||||||
|
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
|
|
||||||
|
cfg_if! {
|
||||||
|
if #[cfg(not(all(target_endian = "big", target_pointer_width = "32")))] {
|
||||||
|
// most architectures
|
||||||
|
pub use smartstring::alias::String;
|
||||||
|
} else {
|
||||||
|
// powerpc and other big endian 32-bit archs
|
||||||
|
pub use std::string::String;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(any(all(unix, feature = "infer-backend"), all(not(unix), not(feature = "xdg-mime-backend"))))] {
|
if #[cfg(any(all(unix, feature = "infer-backend"), all(not(unix), not(feature = "xdg-mime-backend"))))] {
|
||||||
/// A [OnceCell] holding an instance of [mime_db::MimeDb].
|
/// A [OnceCell] holding an instance of [mime_db::MimeDb].
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//! [Clap] struct used to parse command line arguments.
|
//! [Clap] struct used to parse command line arguments.
|
||||||
|
|
||||||
use crate::string_type::String as StringType;
|
use crate::String as StringType;
|
||||||
use crate::utils::{clap_long_version, clap_version};
|
use crate::utils::{clap_long_version, clap_version};
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use clap::{AppSettings, Clap};
|
use clap::{AppSettings, Clap};
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
use cfg_if::cfg_if;
|
|
||||||
|
|
||||||
cfg_if! {
|
|
||||||
if #[cfg(not(all(target_endian = "big", target_pointer_width = "32")))] {
|
|
||||||
// most architectures
|
|
||||||
pub use smartstring::alias::String;
|
|
||||||
} else {
|
|
||||||
// powerpc and other big endian 32-bit archs
|
|
||||||
pub use std::string::String;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@ use fif::findings::Findings;
|
||||||
use fif::formats::{Format, PowerShell, Shell};
|
use fif::formats::{Format, PowerShell, Shell};
|
||||||
use fif::inspectors::{mime_extension_lookup, BUF_SIZE};
|
use fif::inspectors::{mime_extension_lookup, BUF_SIZE};
|
||||||
use fif::mime_db::MimeDb;
|
use fif::mime_db::MimeDb;
|
||||||
use fif::string_type::String;
|
use fif::String;
|
||||||
|
|
||||||
use crate::parameters::Parameters;
|
use crate::parameters::Parameters;
|
||||||
use clap::Clap;
|
use clap::Clap;
|
||||||
|
|
Loading…
Reference in a new issue