Simplify gcd example: remove unnecessary clone

This commit is contained in:
Josh Triplett
2019-11-19 21:40:22 -08:00
committed by Jakub Konka
parent 7c8ac3d71c
commit 3cb238366d

View File

@@ -58,7 +58,7 @@ fn main() -> Result<()> {
let instance = Instance::new(&store, &module, &[])?; let instance = Instance::new(&store, &module, &[])?;
// Invoke `gcd` export // Invoke `gcd` export
let gcd = instance.exports()[gcd_index].func().expect("gcd").clone(); let gcd = instance.exports()[gcd_index].func().expect("gcd");
let result = gcd let result = gcd
.borrow() .borrow()
.call(&[Val::from(6i32), Val::from(27i32)]) .call(&[Val::from(6i32), Val::from(27i32)])