Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 17, 2024
1 parent 4473f98 commit e78adaa
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cmd/soroban-rpc/lib/preflight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ use soroban_simulation::simulation::{
};
use soroban_simulation::{AutoRestoringSnapshotSource, NetworkConfig, SnapshotSourceWithArchive};
use std::cell::RefCell;
use std::convert::TryFrom;
use std::ffi::{CStr, CString};
use std::panic;
use std::ptr::null_mut;
use std::rc::Rc;
use std::{mem, slice};
use std::convert::TryFrom;

#[repr(C)]
#[derive(Copy, Clone)]
Expand Down Expand Up @@ -168,10 +168,7 @@ impl CPreflightResult {
let mut result = Self {
error: string_to_c(error),
auth: xdr_vec_to_c(invoke_hf_result.auth),
result: option_xdr_to_c(
invoke_hf_result
.invoke_result.ok(),
),
result: option_xdr_to_c(invoke_hf_result.invoke_result.ok()),
min_fee: invoke_hf_result
.transaction_data
.as_ref()
Expand Down Expand Up @@ -660,11 +657,14 @@ fn extract_error_string<T>(simulation_result: &Result<T>, go_storage: &GoLedgerS
match simulation_result {
Ok(_) => String::new(),
Err(e) =>
// Override any simulation result with a storage error (if any). Simulation does not propagate the storage
// errors, but these provide more exact information on the root cause.
if let Some(e) = go_storage.internal_error.borrow().as_ref()
{ format!("{e:?}") }
else
{ format!("{e:?}") }
// Override any simulation result with a storage error (if any). Simulation does not propagate the storage
// errors, but these provide more exact information on the root cause.
{
if let Some(e) = go_storage.internal_error.borrow().as_ref() {
format!("{e:?}")
} else {
format!("{e:?}")
}
}
}
}

0 comments on commit e78adaa

Please sign in to comment.