intermodal/src/common.rs

47 lines
1.1 KiB
Rust
Raw Normal View History

2019-05-24 10:25:55 +02:00
// stdlib types
pub(crate) use std::{
borrow::Cow,
cmp::{Ordering, Reverse},
collections::{BTreeMap, HashMap},
convert::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},
process, str,
time::{SystemTime, SystemTimeError},
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};
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
pub(crate) use crate::{bencode, consts, error, torrent};
// traits
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::{
env::Env, error::Error, file_info::FileInfo, hasher::Hasher, info::Info, metainfo::Metainfo,
mode::Mode, opt::Opt, subcommand::Subcommand, torrent::Torrent,
2019-05-24 10:25:55 +02:00
};
// test modules
#[cfg(test)]
pub(crate) use crate::testing;