diff options
Diffstat (limited to 'crates/stdx/src/lib.rs')
-rw-r--r-- | crates/stdx/src/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/crates/stdx/src/lib.rs b/crates/stdx/src/lib.rs index b0a18d58d..e3eb10915 100644 --- a/crates/stdx/src/lib.rs +++ b/crates/stdx/src/lib.rs | |||
@@ -1,7 +1,8 @@ | |||
1 | //! Missing batteries for standard libraries. | 1 | //! Missing batteries for standard libraries. |
2 | use std::{cmp::Ordering, ops, process, time::Instant}; | 2 | use std::{cmp::Ordering, ops, time::Instant}; |
3 | 3 | ||
4 | mod macros; | 4 | mod macros; |
5 | pub mod process; | ||
5 | pub mod panic_context; | 6 | pub mod panic_context; |
6 | 7 | ||
7 | pub use always_assert::{always, never}; | 8 | pub use always_assert::{always, never}; |
@@ -179,17 +180,17 @@ where | |||
179 | } | 180 | } |
180 | 181 | ||
181 | #[repr(transparent)] | 182 | #[repr(transparent)] |
182 | pub struct JodChild(pub process::Child); | 183 | pub struct JodChild(pub std::process::Child); |
183 | 184 | ||
184 | impl ops::Deref for JodChild { | 185 | impl ops::Deref for JodChild { |
185 | type Target = process::Child; | 186 | type Target = std::process::Child; |
186 | fn deref(&self) -> &process::Child { | 187 | fn deref(&self) -> &std::process::Child { |
187 | &self.0 | 188 | &self.0 |
188 | } | 189 | } |
189 | } | 190 | } |
190 | 191 | ||
191 | impl ops::DerefMut for JodChild { | 192 | impl ops::DerefMut for JodChild { |
192 | fn deref_mut(&mut self) -> &mut process::Child { | 193 | fn deref_mut(&mut self) -> &mut std::process::Child { |
193 | &mut self.0 | 194 | &mut self.0 |
194 | } | 195 | } |
195 | } | 196 | } |
@@ -202,9 +203,9 @@ impl Drop for JodChild { | |||
202 | } | 203 | } |
203 | 204 | ||
204 | impl JodChild { | 205 | impl JodChild { |
205 | pub fn into_inner(self) -> process::Child { | 206 | pub fn into_inner(self) -> std::process::Child { |
206 | // SAFETY: repr transparent | 207 | // SAFETY: repr transparent |
207 | unsafe { std::mem::transmute::<JodChild, process::Child>(self) } | 208 | unsafe { std::mem::transmute::<JodChild, std::process::Child>(self) } |
208 | } | 209 | } |
209 | } | 210 | } |
210 | 211 | ||