Skip to content

Commit

Permalink
Minor doc improvements
Browse files Browse the repository at this point in the history
A different path than #256, but same idea.

Also a clarification for why encoded_len can't just use `?`.
  • Loading branch information
marshallpierce committed Nov 12, 2023
1 parent baffe6c commit 5466e43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/encode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ pub const fn encoded_len(bytes_len: usize, padding: bool) -> Option<usize> {
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
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
//!
Expand Down

0 comments on commit 5466e43

Please sign in to comment.