Is there any reason genio error types shouldn't derive the Debug trait?
I'm trying to write my own implementation of Cursor for (eventually) an embedded project. I would like to be able to call cursor.read_exact(&mut buffer) and then unwrap the result to check for errors. But unwrap requires an implementation of Debug.
When I try to run this code:
let mut buf = [0; 5];
let mut cursor = Cursor::new(vec![1u8, 2u8, 3u8]);
cursor.read_exact(&mut buf).unwrap();
I get this error:
no method named `unwrap` found for type `std::result::Result<(), genio::error::ReadExactError<void::Void>>` in the current scope
note: the method `unwrap` exists but the following trait bounds were not satisfied: genio::error::ReadExactError<void::Void> : std::fmt::Debug
Is there any reason genio error types shouldn't derive the Debug trait?
I'm trying to write my own implementation of Cursor for (eventually) an embedded project. I would like to be able to call
cursor.read_exact(&mut buffer)
and then unwrap the result to check for errors. But unwrap requires an implementation of Debug.When I try to run this code:
I get this error: