diff options
author | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-13 16:10:48 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-13 16:10:48 +0100 |
commit | 7fa81df83339c451178e27aa26cf6f1a331ccd4a (patch) | |
tree | e54e18436229fd467dcc63ffa107fbb37f313460 /src | |
parent | e76394776d726de76b0eee483e01be284ac8fb40 (diff) | |
download | mt_ser-7fa81df83339c451178e27aa26cf6f1a331ccd4a.tar.xz |
Improve attributes
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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<dyn Debug>, Box<dyn Debug>), } impl From<Infallible> for DeserializeError { @@ -228,7 +229,7 @@ impl MtLen for () { } } -pub struct Utf16<B: MtCfg>(pub B); +pub struct Utf16<B: MtCfg = DefCfg>(pub B); impl<B: MtCfg> MtCfg for Utf16<B> { type Len = B::Len; |