chiark / gitweb /
utils: use prelude instead of ad-hoc imports
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Feb 2021 14:48:54 +0000 (14:48 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Feb 2021 14:48:54 +0000 (14:48 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/prelude.rs
src/utils.rs

index 473a499159b183d6802b760ea999788e15bb5c54..dfa31e899d1280005d02d3b7e7964bc2f84ed160 100644 (file)
@@ -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;
index f1916866e3dbccbc9a18835bc9df4e63ed35e2ac..a5753a902c00bbea5616a520a942ebb0d1d081c3 100644 (file)
@@ -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 {