Replies: 2 comments 1 reply
-
Well, you have modified the code to change the return types depending on #[cfg(test)]. What error do you get when you try to use this definition? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Why isn't the trait |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have this struct in my module
Contract
is a generic struct from an exernal crateweb3::contract::Contract
I've tried mocking the struct as:
From what I've been reading adding the
' static
is mandatory for now #217. The problem is that this that now the functions return types don't match becauseR
has a'static
lifetime in the tests. If I don't make it static then I have the problem of not living long enough.How could I deal with this issue? Being an external crate I can't modify the code to change the return types depending of if testing or not
Beta Was this translation helpful? Give feedback.
All reactions