From 2910e21847cd1474a48129cedb4a3975a5f5e4d3 Mon Sep 17 00:00:00 2001 From: phidiaLam <2957035701@qq.com> Date: Wed, 20 Nov 2024 00:21:08 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/bitmap-convert/src/base70.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/bitmap-convert/src/base70.rs b/libs/bitmap-convert/src/base70.rs index 484ef325..50ce5a97 100644 --- a/libs/bitmap-convert/src/base70.rs +++ b/libs/bitmap-convert/src/base70.rs @@ -53,8 +53,8 @@ impl BitmapBase70Conv for Bitmap<256> { for c in string.chars() { let index = CHAR_TO_INDEX .get(c as usize) - .ok_or(Error::NotConvertBitmap(string.clone()))?; - match *index { + .copied(); + match index.flatten() { None => return Err(Error::NotConvertBitmap(string.clone())), Some(i) => bytes.push(i), }