Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit ab47be0

Browse files
authored
fix overflow
1 parent e5cd75c commit ab47be0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/base64.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ impl<'a, T: ?Sized + FromBase64> FromBase64 for &'a T {
333333
///
334334
/// ```
335335
/// let mut ch = 0u8;
336-
/// loop {
336+
/// for ch in 0..255 {
337+
/// let ch = ch as u8;
337338
/// let code = match ch {
338339
/// b'A'...b'Z' => ch - 0x41,
339340
/// b'a'...b'z' => ch - 0x47,

0 commit comments

Comments
 (0)