Closed sutes closed 2 years ago
Does your workaround even work? I would expect it to fail when you try to set an expectation unless the lifetime is 'static
. In general, crafting mock methods that return a struct with a lifetime parameter is very hard. I suggest a workaround like this:
mockall::mock!{
Test {}
impl Test for Test {
fn test(&self) -> Result<&'static Path, std::io::Error>;
}
}
Closing as duplicate of #387 .
Version 0.11.2.
produces:
Workaround: