From 31b5e882aa9058bf19534ab40ee6efa1ce6b2d73 Mon Sep 17 00:00:00 2001 From: Sam Scott Date: Fri, 10 Mar 2017 13:27:42 -0500 Subject: Cleaning up, modifying docs. --- src/ser/key.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ser/key.rs') diff --git a/src/ser/key.rs b/src/ser/key.rs index eb7ffae..5b2ccdd 100644 --- a/src/ser/key.rs +++ b/src/ser/key.rs @@ -70,7 +70,7 @@ impl Sink for KeySink Err(self.unsupported()) } - fn unsupported(self) -> Error { + fn unsupported(&self) -> Error { Error::Custom("unsupported key".into()) } } @@ -85,7 +85,7 @@ where End: for<'key> FnOnce(Key<'key>) -> Result _key: &'static str, _value: &T) -> Result<(), Error> { - Err(Error::top_level()) + Err(self.unsupported()) } fn end(self) -> Result { @@ -102,7 +102,7 @@ where End: for<'key> FnOnce(Key<'key>) -> Result fn serialize_element(&mut self, _value: &T) -> Result<(), Error> { - Err(Error::top_level()) + Err(self.unsupported()) } fn end(self) -> Result { -- cgit v1.2.3