Skip to content

Commit

Permalink
Final code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
monoid committed Mar 7, 2023
1 parent 86d9d48 commit 042afdb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ fn try_to_service_result(
exec_ctx: &mut ExecutionCtx<'_>,
trace_ctx: &mut TraceHandler,
) -> ExecutionResult<Rc<JValue>> {
// use CallResult::Failed;

match serde_json::from_str(&service_result.result) {
Ok(result) => Ok(Rc::new(result)),
Err(e) => {
Expand Down
6 changes: 0 additions & 6 deletions crates/air-lib/interpreter-cid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ impl<T: ?Sized> CID<T> {
pub fn into_inner(self) -> String {
self.0
}

/// Occationaly we generate CID of one type, but we have to
/// store it as another data type.
pub fn transmute<S: ?Sized>(self) -> CID<S> {
CID(self.0, PhantomData)
}
}

impl<T: ?Sized> fmt::Debug for CID<T> {
Expand Down
1 change: 1 addition & 0 deletions crates/air-lib/interpreter-data/src/executed_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub enum ValueRef {
Unused(Rc<CID<ServiceResultAggregate>>),
}

/// Please note that second argument is a JSON-serialized value, not a plain error message.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct CallServiceFailed(pub i32, pub Rc<String>);

Expand Down

0 comments on commit 042afdb

Please sign in to comment.