Fix serde expecting() string for Keypair.

This commit is contained in:
Isis Lovecruft 2018-01-26 22:19:55 +00:00
parent bc9faa4186
commit 08a5fc34ae
Failed to extract signature

View file

@ -910,7 +910,9 @@ impl<'d> Deserialize<'d> for Keypair {
type Value = Keypair;
fn expecting(&self, formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
formatter.write_str("An ed25519 signature as specified in RFC8032")
formatter.write_str("An ed25519 keypair, 64 bytes in total where the secret key is \
the first 32 bytes and is in unexpanded form, and the second \
32 bytes is a compressed point for a public key.")
}
fn visit_bytes<E>(self, bytes: &[u8]) -> Result<Keypair, E> where E: SerdeError {