From 7fa81df83339c451178e27aa26cf6f1a331ccd4a Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Mon, 13 Feb 2023 16:10:48 +0100 Subject: Improve attributes --- src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index f57e487..4eaf119 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ use paste::paste as paste_macro; use std::{ collections::{HashMap, HashSet}, convert::Infallible, + fmt::Debug, io::{self, Read, Write}, num::TryFromIntError, ops::Deref, @@ -47,8 +48,8 @@ pub enum DeserializeError { InvalidUtf16(#[from] std::char::DecodeUtf16Error), #[error("invalid {0} enum variant {1}")] InvalidEnumVariant(&'static str, u64), - #[error("invalid constant - wanted: {0} - got: {1}")] - InvalidConst(u64, u64), + #[error("invalid constant - wanted: {0:?} - got: {1:?}")] + InvalidConst(Box, Box), } impl From for DeserializeError { @@ -228,7 +229,7 @@ impl MtLen for () { } } -pub struct Utf16(pub B); +pub struct Utf16(pub B); impl MtCfg for Utf16 { type Len = B::Len; -- cgit v1.2.3