You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at using this crate for testing but have run into a bit of a road block. My trait is using the Error return type from the failure crate. Unfortunately it looks like this particular implementation of Error does not implement std::clone::Clone, which appears to be a requirement imposed by double.
Any thoughts on how to work around this? I don't think I can implement Clone myself on failure::Error since I'm using it as an external crate.
The text was updated successfully, but these errors were encountered:
I need to mock Read trait. The read method receives a &mut [u8] and returns Result<usize, io::Error>, both not clonable.
The Mock documentation states:
/// Used for tracking function call arguments and specifying a predetermined
/// return value or mock function.
///
/// See the crate documentation for more substantial examples, including some
/// that demonstrate how to use `Mock` for methods that have multiple arguments
/// as well as methods with argument or return types that do not implement
/// `Clone`.
But I was unable to find anything about using double mocks with not clonable parameters and returns, only with missing default trait.
I'm looking at using this crate for testing but have run into a bit of a road block. My trait is using the
Error
return type from the failure crate. Unfortunately it looks like this particular implementation ofError
does not implementstd::clone::Clone
, which appears to be a requirement imposed bydouble
.Any thoughts on how to work around this? I don't think I can implement
Clone
myself onfailure::Error
since I'm using it as an external crate.The text was updated successfully, but these errors were encountered: