message: rust: Change instantiate() to Error type
diff: @@ -198,7 +198,7 @@ impl Drop for Instance {
  impl Module {
  /// Create an instance of a module.
  // TODO: support imported functions
  - pub fn instantiate(self) -> Result<Instance, String> {
  + pub fn instantiate(self) -> Result<Instance, Error> {
  let mut err = FizzyErrorBox::new();
  let ptr = unsafe {
  sys::fizzy_instantiate(
  @@ -217,7 +217,7 @@ impl Module {
  core::mem::forget(self);
  if ptr.is_null() {
  debug_assert!(err.code() != 0);
  - Err(err.message())
  + Err(err.error().unwrap())
  } else {
  debug_assert!(err.code() == 0);
  Ok(Instance(unsafe { NonNull::new_unchecked(ptr) }))
  @@ -782,7 +782,9 @@ mod tests {
  let instance = module.unwrap().instantiate();
  assert_eq!(
  instance.err().unwrap(),
  - "module defines an imported memory but none was provided"
  + Error::InstantiationFailed(
  + "module defines an imported memory but none was provided".to_string()
  + )
  );
  }
  