mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-18 08:10:11 +00:00
Polish
This commit is contained in:
parent
6438ef9aa3
commit
bc1aa93e7e
2 changed files with 18 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
|||
//! Missing batteries for standard libraries.
|
||||
use std::iter;
|
||||
use std::process::Command;
|
||||
use std::{cmp::Ordering, ops, time::Instant};
|
||||
use std::{io as sio, iter};
|
||||
|
||||
mod macros;
|
||||
pub mod process;
|
||||
|
@ -159,16 +159,10 @@ impl Drop for JodChild {
|
|||
}
|
||||
|
||||
impl JodChild {
|
||||
pub fn spawn(mut command: Command) -> std::io::Result<Self> {
|
||||
pub fn spawn(mut command: Command) -> sio::Result<Self> {
|
||||
command.spawn().map(Self)
|
||||
}
|
||||
|
||||
pub fn wait(self) -> std::io::Result<std::process::ExitStatus> {
|
||||
let mut inner = self.into_inner();
|
||||
let _ = inner.kill();
|
||||
inner.wait()
|
||||
}
|
||||
|
||||
pub fn into_inner(self) -> std::process::Child {
|
||||
if cfg!(target_arch = "wasm32") {
|
||||
panic!("no processes on wasm");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue