title: Rust referencing with js-sandbox
body: <p>I am writing a calculator in rust that uses js-sandbox to allow user-scripting for custom functions in javascript</p>
  <p>I have a function that takes a mutable reference to an <code>i32</code> and returns an <code>Option</code> in case of error, I call it <code>run_js</code></p>
  <p>I want to create a variable <code>js_out</code> and pass the reference to <code>run_js</code>, and print it out to prove that the function ran properly</p>
  <p>I also have a <code>main.js</code> file with the function <code>fibonacci</code> which I tested, and it works with nodejs</p>
  <p>I am getting the error: `let *output = script.call(&quot;fibonacci&quot;, &amp;arg)?; expected pattern``</p>
  <p>main.rs</p>
  <pre><code>use js_sandbox::{Script, AnyError};
  
  
  fn run_js(sname: &amp;str, output: &amp;mut i32) -&gt; Result&lt;(), AnyError&gt; {
      let mut script = Script::from_file(sname).expect(&quot;File can be loaded&quot;);
      let arg = 6;
      let *output = script.call(&quot;fibonacci&quot;, &amp;arg)?;
      Ok(())
  }
  
  fn main() -&gt; Result&lt;(), AnyError&gt; {
      println!(&quot;SCalc version 0.1.0&quot;);
  
      let mut js_out: i32 = 0;
  
      run_js(&quot;src/main.js&quot;, &amp;mut js_out)?;
  
      println!(&quot;output: {}&quot;, js_out);
      Ok(())
  }
  </code></pre>
  <p>main.js</p>
  <pre><code>function fibonacci(length, startNums=[0, 1]) {
      for (var i = 1; i &lt; length-1; i++) {
          startNums.push(startNums[i-1]+startNums[i]);
      }
      return startNums[startNums.length-1];
  }
  
  console.log(fibonacci(6));
  </code></pre>