mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-06 09:11:07 +00:00
1 parent
ea182e2561
commit
2ff7d003ee
1 file changed
+3
@@ -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.
|
/// 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 {
|
fn invalid_length(len: usize) -> Self {
|
||||||
Error::custom(format!("Invalid length: {}", len))
|
Error::custom(format!("Invalid length: {}", len))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user