Auto merge of #343 - pyfisch:patch-1, r=oli-obk

Better documentation for de::Error::invalid_length

Closes #342
This commit is contained in:
Homu 2016-05-24 20:32:57 +09:00
commit 6c2af4da7a

View File

@ -39,6 +39,9 @@ pub trait Error: Sized + error::Error {
}
/// Raised when a fixed sized sequence or map was passed in the wrong amount of arguments.
///
/// The parameter `len` is the number of arguments found in the serialization. The sequence
/// may either expect more arguments or less arguments.
fn invalid_length(len: usize) -> Self {
Error::custom(format!("Invalid length: {}", len))
}