diff options
author | Tuna <dvt.tnhn.krlbs@icloud.com> | 2023-08-03 00:25:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 21:25:37 +0000 |
commit | 4c8db6af8730ff0213fc08b79a2dbc78b310394b (patch) | |
tree | 12523e1c07090a5d80f6248dc8971f0433faa928 /components/script/dom/filereader.rs | |
parent | ad0fa774566b65da6fe965731954ad1389e42185 (diff) | |
download | servo-4c8db6af8730ff0213fc08b79a2dbc78b310394b.tar.gz servo-4c8db6af8730ff0213fc08b79a2dbc78b310394b.zip |
bump base64 from 0.10 to 0.21 (#29804)
* bump base64 from 0.10 to 0.21
* Fix configuration of bitflags
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/filereader.rs')
-rw-r--r-- | components/script/dom/filereader.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs index 5a1a880c274..5e0740c557f 100644 --- a/components/script/dom/filereader.rs +++ b/components/script/dom/filereader.rs @@ -25,7 +25,7 @@ use crate::realms::enter_realm; use crate::script_runtime::JSContext; use crate::task_source::file_reading::FileReadingTask; use crate::task_source::{TaskSource, TaskSourceName}; -use base64; +use base64::Engine; use dom_struct::dom_struct; use encoding_rs::{Encoding, UTF_8}; use js::jsapi::Heap; @@ -89,7 +89,7 @@ pub struct FileReaderSharedFunctionality; impl FileReaderSharedFunctionality { pub fn dataurl_format(blob_contents: &[u8], blob_type: String) -> DOMString { - let base64 = base64::encode(&blob_contents); + let base64 = base64::engine::general_purpose::STANDARD.encode(&blob_contents); let dataurl = if blob_type.is_empty() { format!("data:base64,{}", base64) |