From d6ff5e87a26811decea27db733ed6140c4ad0bca Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 21 Feb 2021 14:48:54 +0000 Subject: [PATCH] utils: use prelude instead of ad-hoc imports Signed-off-by: Ian Jackson --- src/prelude.rs | 3 ++- src/utils.rs | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) 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 { -- 2.30.2