From cce948a6bc386119fce27696c95f4243714c2c32 Mon Sep 17 00:00:00 2001 From: renovate Date: Wed, 27 Mar 2024 09:45:43 +0000 Subject: [PATCH] fix(deps): update rust crate base64 to 0.22.0 (#16) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [base64](https://github.com/marshallpierce/rust-base64) | dependencies | minor | `0.13.0` -> `0.22.0` | > :exclamation: **Important** > > Release Notes retrieval for this PR were skipped because no github.com credentials were available. > If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes). --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Co-authored-by: Renovate Bot Co-authored-by: Paul Campbell Reviewed-on: https://git.kemitix.net/kemitix/paperoni/pulls/16 Co-authored-by: renovate Co-committed-by: renovate --- Cargo.toml | 2 +- src/html.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 203a90a..4729092 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" [dependencies] # atty = "0.2.14" async-std = "1.12.0" -base64 = "0.13.0" +base64 = "0.22.0" chrono = "0.4.36" clap = { version = "2.34.0", features = ["yaml"] } colored = "2.1.0" diff --git a/src/html.rs b/src/html.rs index b43df6a..07ad767 100644 --- a/src/html.rs +++ b/src/html.rs @@ -4,7 +4,8 @@ use std::{ path::Path, }; -use base64::encode; +use base64::prelude::*; + use comfy_table::{Attribute, Cell, CellAlignment, Color, ContentArrangement, Table}; use html5ever::{LocalName, Namespace, QualName}; use indicatif::{ProgressBar, ProgressStyle}; @@ -267,7 +268,7 @@ fn update_imgs_base64(article: &Article) -> Result<(), std::io::Error> { let img_base64_str = format!( "data:image:{};base64,{}", mime_type.as_deref().unwrap_or("image/*"), - encode(img_bytes) + BASE64_STANDARD.encode(img_bytes) ); let img_elems = article