I have a struct Foo that I'm trying to mock with faux. One of the methods has something like this:
#[cfg_attr(test, faux::methods)]
impl Foo {
pub async fn method(&self) {
Bar::method(self).await; // Error: Bar::method expects &Foo, but self is &_FauxOriginal_Foo.
}
}
Ideally, faux would do some magic here to pass Bar::method a reference to the outer &Foo enum without any code changes, but in the interim, is there any way to make this work?
I have a
struct Foothat I'm trying to mock with faux. One of the methods has something like this:Ideally, faux would do some magic here to pass
Bar::methoda reference to the outer&Fooenum without any code changes, but in the interim, is there any way to make this work?