From ac44658bfb58376c6f8e93d55069fbcb561884d9 Mon Sep 17 00:00:00 2001 From: Gimgim <93856041+gimbles@users.noreply.github.com> Date: Thu, 18 Aug 2022 23:17:19 +0530 Subject: [PATCH] Document what the usizes are for (#546) (#577) * Document what the usize is for * Document the usize Co-authored-by: Trangar --- src/features/impl_std.rs | 1 + src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/features/impl_std.rs b/src/features/impl_std.rs index 5226f78..e0b7b4b 100644 --- a/src/features/impl_std.rs +++ b/src/features/impl_std.rs @@ -81,6 +81,7 @@ where /// Encode the given value into any type that implements `std::io::Write`, e.g. `std::fs::File`, with the given `Config`. /// See the [config] module for more information. +/// Returns the amount of bytes written. /// /// [config]: config/index.html #[cfg_attr(docsrs, doc(cfg(feature = "std")))] diff --git a/src/lib.rs b/src/lib.rs index 9c13e47..bd1ac76 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ pub fn encode_into_writer( Ok(()) } -/// Attempt to decode a given type `D` from the given slice. +/// Attempt to decode a given type `D` from the given slice. Returns the decoded output and the amount of bytes read. /// /// See the [config] module for more information on configurations. /// @@ -148,7 +148,7 @@ pub fn decode_from_slice( Ok((result, bytes_read)) } -/// Attempt to decode a given type `D` from the given slice. +/// Attempt to decode a given type `D` from the given slice. Returns the decoded output and the amount of bytes read. /// /// See the [config] module for more information on configurations. ///