Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upchange error message #97
Conversation
|
Seems reasonable. Another option would be to add a SerializeError variant for this case. |
|
I like that more actually. |
|
I don't think "infinite" is the right word, especially because SizeLimit::Infinite means something completely different. If serialize_seq does not receive a size, it is because the Serialize type does not know the length up front, for example because we are serializing an iterator that can only be iterated once. |
| @@ -49,6 +49,7 @@ impl fmt::Display for SerializeError { | |||
| match *self { | |||
| SerializeError::IoError(ref err) => write!(f, "IoError: {}", err), | |||
| SerializeError::Custom(ref s) => write!(f, "Custom Error {}", s), | |||
| SerializeError::InfiniteSequence => write!(f, "InfiniteSequence"), | |||
This comment has been minimized.
This comment has been minimized.
dtolnay
Jan 31, 2017
Collaborator
Please make this a human-readable error message. This is the Display impl not Debug.
|
@dtolnay Changed it to |
|
Cool. I filed #98 to follow up on the other messages. |
TyOverby commentedJan 31, 2017
I didn't like the old error message