Skip to content

Commit

Permalink
Fix bug in contracterror (#719)
Browse files Browse the repository at this point in the history
* Fix bug in contracterror

* fix
  • Loading branch information
leighmcculloch authored Oct 7, 2022
1 parent 502e180 commit 4a3e4f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions soroban-sdk-macros/src/derive_error_enum_int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ pub fn derive_type_error_enum_int(
impl #path::IntoVal<#path::Env, #path::RawVal> for #enum_ident {
#[inline(always)]
fn into_val(self, env: &#path::Env) -> #path::RawVal {
let status: Status = self.into();
let status: #path::Status = self.into();
status.into_val(env)
}
}

impl #path::IntoVal<#path::Env, #path::RawVal> for &#enum_ident {
#[inline(always)]
fn into_val(self, env: &#path::Env) -> #path::RawVal {
let status: Status = self.into();
let status: #path::Status = self.into();
status.into_val(env)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/errors/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![no_std]
use soroban_sdk::{contracterror, contractimpl, panic_error, symbol, Env, Status, Symbol};
use soroban_sdk::{contracterror, contractimpl, panic_error, symbol, Env, Symbol};

pub struct Contract;

Expand Down

0 comments on commit 4a3e4f1

Please sign in to comment.