2019-05-24 10:25:55 +02:00
|
|
|
// stdlib types
|
|
|
|
pub(crate) use std::{
|
|
|
|
borrow::Cow,
|
|
|
|
cmp::{Ordering, Reverse},
|
|
|
|
collections::{BTreeMap, HashMap},
|
2020-01-16 08:37:12 +01:00
|
|
|
convert::{Infallible, TryInto},
|
2019-05-24 10:25:55 +02:00
|
|
|
env,
|
|
|
|
ffi::{OsStr, OsString},
|
|
|
|
fmt::{self, Display, Formatter},
|
|
|
|
fs::{self, File},
|
|
|
|
hash::Hash,
|
|
|
|
io::{self, Read, Write},
|
|
|
|
path::{Path, PathBuf},
|
2020-01-16 08:37:12 +01:00
|
|
|
process,
|
|
|
|
str::{self, FromStr},
|
2019-05-24 10:25:55 +02:00
|
|
|
time::{SystemTime, SystemTimeError},
|
2020-01-05 03:58:42 +01:00
|
|
|
usize,
|
2019-05-24 10:25:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// dependencies
|
|
|
|
pub(crate) use libc::EXIT_FAILURE;
|
|
|
|
pub(crate) use regex::{Regex, RegexSet};
|
|
|
|
pub(crate) use serde::{Deserialize, Serialize};
|
|
|
|
pub(crate) use sha1::Sha1;
|
|
|
|
pub(crate) use snafu::{ResultExt, Snafu};
|
2020-01-05 03:58:42 +01:00
|
|
|
pub(crate) use static_assertions::const_assert;
|
2019-05-24 10:25:55 +02:00
|
|
|
pub(crate) use structopt::StructOpt;
|
|
|
|
pub(crate) use url::Url;
|
|
|
|
pub(crate) use walkdir::WalkDir;
|
|
|
|
|
|
|
|
// modules
|
2020-01-16 08:37:12 +01:00
|
|
|
pub(crate) use crate::{bencode, consts, error, torrent, use_color};
|
2019-05-24 10:25:55 +02:00
|
|
|
|
|
|
|
// traits
|
2020-01-05 03:58:42 +01:00
|
|
|
pub(crate) use crate::{
|
|
|
|
into_u64::IntoU64, into_usize::IntoUsize, path_ext::PathExt, reckoner::Reckoner,
|
|
|
|
};
|
2019-05-24 10:25:55 +02:00
|
|
|
|
|
|
|
// structs and enums
|
|
|
|
pub(crate) use crate::{
|
2020-01-08 03:05:48 +01:00
|
|
|
env::Env, error::Error, file_info::FileInfo, hasher::Hasher, info::Info, metainfo::Metainfo,
|
2020-01-16 08:37:12 +01:00
|
|
|
mode::Mode, opt::Opt, style::Style, subcommand::Subcommand, torrent::Torrent,
|
|
|
|
use_color::UseColor,
|
2019-05-24 10:25:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// test modules
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use crate::testing;
|
2020-01-14 09:52:27 +01:00
|
|
|
|
|
|
|
// test stdlib types
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use std::{
|
|
|
|
cell::RefCell,
|
|
|
|
io::Cursor,
|
|
|
|
iter,
|
|
|
|
ops::{Deref, DerefMut},
|
|
|
|
rc::Rc,
|
|
|
|
};
|
|
|
|
|
|
|
|
// test structs and enums
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use crate::{capture::Capture, test_env::TestEnv};
|