2019-05-24 10:25:55 +02:00
|
|
|
// stdlib types
|
|
|
|
pub(crate) use std::{
|
|
|
|
borrow::Cow,
|
|
|
|
cmp::{Ordering, Reverse},
|
2020-02-03 13:39:48 +01:00
|
|
|
collections::{BTreeMap, BTreeSet, 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},
|
2020-02-01 21:30:35 +01:00
|
|
|
num::ParseFloatError,
|
2020-02-05 04:59:06 +01:00
|
|
|
ops::{Div, DivAssign, Mul, MulAssign},
|
2020-02-06 01:01:44 +01:00
|
|
|
path::{self, Path, PathBuf},
|
2020-01-30 14:54:08 +01:00
|
|
|
process::{self, Command, ExitStatus},
|
2020-01-16 08:37:12 +01:00
|
|
|
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
|
2020-02-04 16:55:50 +01:00
|
|
|
pub(crate) use chrono::{TimeZone, Utc};
|
2019-05-24 10:25:55 +02:00
|
|
|
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;
|
2020-01-24 23:17:31 +01:00
|
|
|
pub(crate) use structopt::{
|
|
|
|
clap::{AppSettings, ArgSettings},
|
|
|
|
StructOpt,
|
|
|
|
};
|
2020-02-04 16:55:50 +01:00
|
|
|
pub(crate) use unicode_width::UnicodeWidthStr;
|
2019-05-24 10:25:55 +02:00
|
|
|
pub(crate) use url::Url;
|
|
|
|
pub(crate) use walkdir::WalkDir;
|
|
|
|
|
|
|
|
// modules
|
2020-02-05 04:59:06 +01:00
|
|
|
pub(crate) use crate::{bencode, consts, error, use_color};
|
2019-05-24 10:25:55 +02:00
|
|
|
|
|
|
|
// traits
|
2020-01-05 03:58:42 +01:00
|
|
|
pub(crate) use crate::{
|
2020-01-30 14:54:08 +01:00
|
|
|
into_u64::IntoU64, into_usize::IntoUsize, path_ext::PathExt,
|
|
|
|
platform_interface::PlatformInterface, reckoner::Reckoner,
|
2020-01-05 03:58:42 +01:00
|
|
|
};
|
2019-05-24 10:25:55 +02:00
|
|
|
|
|
|
|
// structs and enums
|
|
|
|
pub(crate) use crate::{
|
2020-02-06 01:01:44 +01:00
|
|
|
bytes::Bytes, env::Env, error::Error, file_info::FileInfo, file_path::FilePath, files::Files,
|
|
|
|
hasher::Hasher, info::Info, lint::Lint, linter::Linter, metainfo::Metainfo, mode::Mode, opt::Opt,
|
2020-02-05 04:59:06 +01:00
|
|
|
piece_length_picker::PieceLengthPicker, platform::Platform, style::Style, table::Table,
|
2020-02-06 01:01:44 +01:00
|
|
|
target::Target, torrent_summary::TorrentSummary, use_color::UseColor, walker::Walker,
|
2019-05-24 10:25:55 +02:00
|
|
|
};
|
|
|
|
|
2020-01-14 09:52:27 +01:00
|
|
|
// test stdlib types
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use std::{
|
|
|
|
cell::RefCell,
|
|
|
|
io::Cursor,
|
|
|
|
ops::{Deref, DerefMut},
|
|
|
|
rc::Rc,
|
2020-01-30 14:54:08 +01:00
|
|
|
time::{Duration, Instant},
|
2020-01-14 09:52:27 +01:00
|
|
|
};
|
|
|
|
|
2020-02-04 16:55:50 +01:00
|
|
|
// test modules
|
|
|
|
#[cfg(test)]
|
|
|
|
pub(crate) use crate::testing;
|
|
|
|
|
2020-01-14 09:52:27 +01:00
|
|
|
// test structs and enums
|
|
|
|
#[cfg(test)]
|
2020-02-04 19:54:41 +01:00
|
|
|
pub(crate) use crate::{capture::Capture, test_env::TestEnv, test_env_builder::TestEnvBuilder};
|