-
Notifications
You must be signed in to change notification settings - Fork 101
IO error EOF getting through #30
Comments
The |
Hmm. Then I'd like to know if EOF in data can cause only the (The |
All io errors are preserved in |
Yes, I already handle that one. I was asking if an EOF in input can cause another error I'd need to handle. Currently I do this: I thought the IO error handling is a temporary workaround, but now it seems like it is going to stay there. So I would like to be sure there's no other branch I need to add. |
Yes IO error handling is (probably) here to stay. Would you prefer if I adapted the error type from serde_json for serde_cbor? |
The However, I didn't really ask for any particular code or API changes. I just wanted to know if what I do is correct/enough or if I should handle some other case as well O:-). |
Let's say I have this code:
The last line correctly fails, as the last byte is missing. However, this is the error I get:
Looking at the documentation, I'd expect the error to be
Eof
, notIo(Custom(… io-based-eof…))
. To be fair, the documentation doesn't explicitly say that all EOF-based errors are going to be reported asEof
, but it was still a bit surprise.The text was updated successfully, but these errors were encountered: