From: Ian Jackson Date: Sun, 21 Feb 2021 14:48:54 +0000 (+0000) Subject: utils: use prelude instead of ad-hoc imports X-Git-Tag: otter-0.4.0~406 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=d6ff5e87a26811decea27db733ed6140c4ad0bca;p=otter.git utils: use prelude instead of ad-hoc imports Signed-off-by: Ian Jackson --- diff --git a/src/prelude.rs b/src/prelude.rs index 473a4991..dfa31e89 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -31,9 +31,10 @@ pub use std::iter::repeat_with; pub use std::marker::PhantomData; pub use std::mem; pub use std::num::{NonZeroUsize, TryFromIntError, Wrapping}; -pub use std::ops::{Deref, DerefMut}; +pub use std::ops::{Deref, DerefMut, Index}; pub use std::os::unix; pub use std::os::unix::ffi::OsStrExt; +pub use std::os::unix::io::IntoRawFd; pub use std::os::unix::net::UnixStream; pub use std::os::unix::process::CommandExt; pub use std::path::PathBuf; diff --git a/src/utils.rs b/src/utils.rs index f1916866..a5753a90 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -3,17 +3,7 @@ // There is NO WARRANTY. use crate::imports::*; - -use std::fmt::{self, Debug}; -use std::fs; -use std::io; -use std::ops::{Deref, Index}; -use std::os::unix::io::IntoRawFd; - -use arrayvec::ArrayVec; -use derive_more::*; -use fehler::{throw, throws}; -use libc; +use crate::prelude::*; #[macro_export] macro_rules! ensure_eq {