Closed gluax closed 2 years ago
It means it expected there to be more data. It may happen if msgpack file was created with a different version or has a structure that doesn't map to the type you're deserializing.
I'm using the same version in the above example, and the types are explicit. So I don't understand what could be going wrong. If I'm doing something wrong, please point it out because I certainly don't see why the above code would be invalid :c.
Oh, I see. You're trying to read past the end of the file. Reading doesn't rewind. It continues after position of last write, where there is nothing.
Reopen or rewind the file.
That was silly of me! Thanks for that!
Results in
read: InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })
.Happens with structs as well, but just wanted to simplify the issue.