From 5466e438838ef057655e11d05c441aa19dbfd64e Mon Sep 17 00:00:00 2001 From: Marshall Pierce <575695+marshallpierce@users.noreply.github.com> Date: Sun, 12 Nov 2023 06:35:28 -0700 Subject: [PATCH] Minor doc improvements A different path than #256, but same idea. Also a clarification for why encoded_len can't just use `?`. --- src/encode.rs | 3 ++- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/encode.rs b/src/encode.rs index 88e6499..ae6d790 100644 --- a/src/encode.rs +++ b/src/encode.rs @@ -98,7 +98,8 @@ pub const fn encoded_len(bytes_len: usize, padding: bool) -> Option { let rem = bytes_len % 3; let complete_input_chunks = bytes_len / 3; - // `let Some(_) = _ else` requires 1.65.0, whereas this messier one works on 1.48 + // `?` is disallowed in const, and `let Some(_) = _ else` requires 1.65.0, whereas this + // messier syntax works on 1.48 let complete_chunk_output = if let Some(complete_chunk_output) = complete_input_chunks.checked_mul(4) { complete_chunk_output diff --git a/src/lib.rs b/src/lib.rs index 6b11fa6..50f433d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,7 +75,7 @@ //! //! # `Display` //! -//! See [display] for how to transparently base64 data via a `Display` implementation. +//! See [display] for how to transparently base64-encode data via a `Display` implementation. //! //! # Examples //!