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