From b4c5ee33ae128df4e82c992d0c13f6c9df0f9f02 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 17 Apr 2020 04:08:01 +0800 Subject: Fix extern_process args --- crates/ra_proc_macro/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'crates/ra_proc_macro/src/lib.rs') diff --git a/crates/ra_proc_macro/src/lib.rs b/crates/ra_proc_macro/src/lib.rs index 14a675db2..b200fd126 100644 --- a/crates/ra_proc_macro/src/lib.rs +++ b/crates/ra_proc_macro/src/lib.rs @@ -12,6 +12,7 @@ pub mod msg; use process::{ProcMacroProcessSrv, ProcMacroProcessThread}; use ra_tt::{SmolStr, Subtree}; use std::{ + ffi::OsStr, path::{Path, PathBuf}, sync::Arc, }; @@ -56,10 +57,14 @@ pub struct ProcMacroClient { } impl ProcMacroClient { - pub fn extern_process>( + pub fn extern_process( process_path: &Path, - args: &[T], - ) -> Result { + args: I, + ) -> Result + where + I: IntoIterator, + S: AsRef, + { let (thread, process) = ProcMacroProcessSrv::run(process_path, args)?; Ok(ProcMacroClient { kind: ProcMacroClientKind::Process { process: Arc::new(process), thread }, -- cgit v1.2.3