Skip to content

Commit

Permalink
minor error coversion change
Browse files Browse the repository at this point in the history
  • Loading branch information
linuskendall committed Jul 25, 2023
1 parent 838a706 commit 561ceed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions das_api/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ pub enum DasApiError {
DeserializationError(#[from] serde_json::Error),
}

impl Into<RpcError> for DasApiError {
fn into(self) -> RpcError {
println!("{}", self);
RpcError::Call(CallError::from_std_error(self))

impl From<DasApiError> for RpcError {
fn from(value: DasApiError) -> Self {
println!("{}", value);
RpcError::Call(CallError::from_std_error(value))
}
}

0 comments on commit 561ceed

Please sign in to comment.