aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-04-20 20:42:36 +0100
committerveetaha <[email protected]>2020-04-20 20:42:36 +0100
commitfc460b1e423c2c510a10539f8289af548685676c (patch)
tree6611fc8cd75c5f80ff766617260ae47584910297
parentd8ca817456ed60b0163d3f81c58f6db9e6372e5f (diff)
Migrate to Result<T, io::Error> -> io::Result<T>
-rw-r--r--crates/ra_proc_macro/src/process.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_proc_macro/src/process.rs b/crates/ra_proc_macro/src/process.rs
index b1ebf46a1..e24944af4 100644
--- a/crates/ra_proc_macro/src/process.rs
+++ b/crates/ra_proc_macro/src/process.rs
@@ -48,7 +48,7 @@ impl Process {
48 fn run( 48 fn run(
49 process_path: PathBuf, 49 process_path: PathBuf,
50 args: impl IntoIterator<Item = impl AsRef<OsStr>>, 50 args: impl IntoIterator<Item = impl AsRef<OsStr>>,
51 ) -> Result<Process, io::Error> { 51 ) -> io::Result<Process> {
52 let child = Command::new(&process_path) 52 let child = Command::new(&process_path)
53 .args(args) 53 .args(args)
54 .stdin(Stdio::piped()) 54 .stdin(Stdio::piped())
@@ -59,7 +59,7 @@ impl Process {
59 Ok(Process { path: process_path, child }) 59 Ok(Process { path: process_path, child })
60 } 60 }
61 61
62 fn restart(&mut self) -> Result<(), io::Error> { 62 fn restart(&mut self) -> io::Result<()> {
63 let _ = self.child.kill(); 63 let _ = self.child.kill();
64 self.child = Command::new(&self.path) 64 self.child = Command::new(&self.path)
65 .stdin(Stdio::piped()) 65 .stdin(Stdio::piped())
@@ -196,7 +196,7 @@ fn send_request(
196 mut writer: &mut impl Write, 196 mut writer: &mut impl Write,
197 mut reader: &mut impl BufRead, 197 mut reader: &mut impl BufRead,
198 req: Request, 198 req: Request,
199) -> Result<Option<Response>, io::Error> { 199) -> io::Result<Option<Response>> {
200 req.write(&mut writer)?; 200 req.write(&mut writer)?;
201 Ok(Response::read(&mut reader)?) 201 Ok(Response::read(&mut reader)?)
202} 202}