| { | ||
| "git": { | ||
| "sha1": "b88fd5bfdcc44409491cdb28105f660f09e08711" | ||
| "sha1": "7f81bafe0e76bcdb84f3069d81d56d77a7a24280" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
+15
-4
@@ -23,3 +23,3 @@ version: '2.1' | ||
| '__msrv__', # won't add any other toolchains, just uses what's in the docker image | ||
| '1.60.0', # minimum needed to build dev-dependencies | ||
| '1.65.0', # minimum needed to build dev-dependencies | ||
| 'stable', | ||
@@ -80,6 +80,16 @@ 'beta', | ||
| name: Build without default features | ||
| command: cargo build --no-default-features | ||
| command: | | ||
| cargo build --no-default-features | ||
| if [[ '<< parameters.toolchain_override >>' != '__msrv__' ]] | ||
| then | ||
| cargo build --no-default-features --all-targets | ||
| fi | ||
| - run: | ||
| name: Build with only alloc | ||
| command: cargo build --no-default-features --features alloc | ||
| command: | | ||
| cargo build --no-default-features --features alloc | ||
| if [[ '<< parameters.toolchain_override >>' != '__msrv__' ]] | ||
| then | ||
| cargo build --no-default-features --features alloc --all-targets | ||
| fi | ||
| - run: | ||
@@ -100,3 +110,4 @@ name: Add arm toolchain | ||
| then | ||
| cargo test --verbose | ||
| cargo test --no-default-features | ||
| cargo test | ||
| fi | ||
@@ -103,0 +114,0 @@ - run: |
@@ -42,4 +42,3 @@ #[macro_use] | ||
| let mut buf = Vec::new(); | ||
| buf.resize(size, 0); | ||
| let mut buf = vec![0; size]; | ||
| b.iter(|| { | ||
@@ -56,4 +55,3 @@ STANDARD.decode_slice(&encoded, &mut buf).unwrap(); | ||
| let mut buf = Vec::new(); | ||
| buf.resize(size, 0); | ||
| let mut buf = vec![0; size]; | ||
| buf.truncate(0); | ||
@@ -101,5 +99,4 @@ | ||
| fill(&mut v); | ||
| let mut buf = Vec::new(); | ||
| // conservative estimate of encoded size | ||
| buf.resize(v.len() * 2, 0); | ||
| let mut buf = vec![0; v.len() * 2]; | ||
| b.iter(|| STANDARD.encode_slice(&v, &mut buf).unwrap()); | ||
@@ -106,0 +103,0 @@ } |
+72
-71
@@ -6,2 +6,11 @@ # This file is automatically @generated by Cargo. | ||
| [[package]] | ||
| name = "aho-corasick" | ||
| version = "1.1.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" | ||
| dependencies = [ | ||
| "memchr", | ||
| ] | ||
| [[package]] | ||
| name = "anes" | ||
@@ -27,3 +36,3 @@ version = "0.1.6" | ||
| dependencies = [ | ||
| "hermit-abi 0.1.19", | ||
| "hermit-abi", | ||
| "libc", | ||
@@ -41,3 +50,3 @@ "winapi", | ||
| name = "base64" | ||
| version = "0.21.4" | ||
| version = "0.21.5" | ||
| dependencies = [ | ||
@@ -60,5 +69,5 @@ "criterion", | ||
| name = "bumpalo" | ||
| version = "3.13.0" | ||
| version = "3.14.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" | ||
| checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" | ||
@@ -177,12 +186,2 @@ [[package]] | ||
| [[package]] | ||
| name = "crossbeam-channel" | ||
| version = "0.5.8" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" | ||
| dependencies = [ | ||
| "cfg-if", | ||
| "crossbeam-utils", | ||
| ] | ||
| [[package]] | ||
| name = "crossbeam-deque" | ||
@@ -268,8 +267,2 @@ version = "0.8.3" | ||
| [[package]] | ||
| name = "hermit-abi" | ||
| version = "0.3.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" | ||
| [[package]] | ||
| name = "indexmap" | ||
@@ -316,5 +309,5 @@ version = "1.9.3" | ||
| name = "libc" | ||
| version = "0.2.147" | ||
| version = "0.2.149" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" | ||
| checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" | ||
@@ -328,2 +321,8 @@ [[package]] | ||
| [[package]] | ||
| name = "memchr" | ||
| version = "2.6.4" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" | ||
| [[package]] | ||
| name = "memoffset" | ||
@@ -339,5 +338,5 @@ version = "0.9.0" | ||
| name = "num-traits" | ||
| version = "0.2.16" | ||
| version = "0.2.17" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" | ||
| checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" | ||
| dependencies = [ | ||
@@ -348,16 +347,6 @@ "autocfg", | ||
| [[package]] | ||
| name = "num_cpus" | ||
| version = "1.16.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" | ||
| dependencies = [ | ||
| "hermit-abi 0.3.2", | ||
| "libc", | ||
| ] | ||
| [[package]] | ||
| name = "once_cell" | ||
| version = "1.17.2" | ||
| version = "1.18.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" | ||
| checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" | ||
@@ -372,11 +361,11 @@ [[package]] | ||
| name = "os_str_bytes" | ||
| version = "6.5.1" | ||
| version = "6.6.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac" | ||
| checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" | ||
| [[package]] | ||
| name = "plotters" | ||
| version = "0.3.4" | ||
| version = "0.3.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" | ||
| checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" | ||
| dependencies = [ | ||
@@ -437,5 +426,5 @@ "num-traits", | ||
| name = "proc-macro2" | ||
| version = "1.0.66" | ||
| version = "1.0.69" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" | ||
| checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" | ||
| dependencies = [ | ||
@@ -486,5 +475,5 @@ "unicode-ident", | ||
| name = "rayon" | ||
| version = "1.7.0" | ||
| version = "1.8.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" | ||
| checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" | ||
| dependencies = [ | ||
@@ -497,10 +486,8 @@ "either", | ||
| name = "rayon-core" | ||
| version = "1.11.0" | ||
| version = "1.12.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" | ||
| checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" | ||
| dependencies = [ | ||
| "crossbeam-channel", | ||
| "crossbeam-deque", | ||
| "crossbeam-utils", | ||
| "num_cpus", | ||
| ] | ||
@@ -510,6 +497,9 @@ | ||
| name = "regex" | ||
| version = "1.8.4" | ||
| version = "1.10.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" | ||
| checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" | ||
| dependencies = [ | ||
| "aho-corasick", | ||
| "memchr", | ||
| "regex-automata", | ||
| "regex-syntax", | ||
@@ -519,6 +509,17 @@ ] | ||
| [[package]] | ||
| name = "regex-automata" | ||
| version = "0.4.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" | ||
| dependencies = [ | ||
| "aho-corasick", | ||
| "memchr", | ||
| "regex-syntax", | ||
| ] | ||
| [[package]] | ||
| name = "regex-syntax" | ||
| version = "0.7.2" | ||
| version = "0.8.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" | ||
| checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" | ||
@@ -581,11 +582,11 @@ [[package]] | ||
| name = "semver" | ||
| version = "1.0.18" | ||
| version = "1.0.20" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" | ||
| checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" | ||
| [[package]] | ||
| name = "serde" | ||
| version = "1.0.188" | ||
| version = "1.0.189" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" | ||
| checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" | ||
| dependencies = [ | ||
@@ -597,9 +598,9 @@ "serde_derive", | ||
| name = "serde_derive" | ||
| version = "1.0.188" | ||
| version = "1.0.189" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" | ||
| checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" | ||
| dependencies = [ | ||
| "proc-macro2", | ||
| "quote", | ||
| "syn 2.0.31", | ||
| "syn 2.0.38", | ||
| ] | ||
@@ -609,5 +610,5 @@ | ||
| name = "serde_json" | ||
| version = "1.0.106" | ||
| version = "1.0.107" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "2cc66a619ed80bf7a0f6b17dd063a84b88f6dea1813737cf469aef1d081142c2" | ||
| checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" | ||
| dependencies = [ | ||
@@ -662,5 +663,5 @@ "itoa", | ||
| name = "syn" | ||
| version = "2.0.31" | ||
| version = "2.0.38" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" | ||
| checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" | ||
| dependencies = [ | ||
@@ -699,5 +700,5 @@ "proc-macro2", | ||
| name = "unicode-ident" | ||
| version = "1.0.11" | ||
| version = "1.0.12" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" | ||
| checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" | ||
@@ -712,5 +713,5 @@ [[package]] | ||
| name = "unicode-width" | ||
| version = "0.1.10" | ||
| version = "0.1.11" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" | ||
| checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" | ||
@@ -766,3 +767,3 @@ [[package]] | ||
| "quote", | ||
| "syn 2.0.31", | ||
| "syn 2.0.38", | ||
| "wasm-bindgen-shared", | ||
@@ -789,3 +790,3 @@ ] | ||
| "quote", | ||
| "syn 2.0.31", | ||
| "syn 2.0.38", | ||
| "wasm-bindgen-backend", | ||
@@ -829,5 +830,5 @@ "wasm-bindgen-shared", | ||
| name = "winapi-util" | ||
| version = "0.1.5" | ||
| version = "0.1.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" | ||
| checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" | ||
| dependencies = [ | ||
@@ -834,0 +835,0 @@ "winapi", |
+15
-2
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "base64" | ||
| version = "0.21.4" | ||
| version = "0.21.5" | ||
| authors = [ | ||
@@ -45,5 +45,18 @@ "Alice Maz <alice@alicemaz.com>", | ||
| [[example]] | ||
| name = "base64" | ||
| required-features = ["std"] | ||
| [[test]] | ||
| name = "tests" | ||
| required-features = ["alloc"] | ||
| [[test]] | ||
| name = "encode" | ||
| required-features = ["alloc"] | ||
| [[bench]] | ||
| name = "benchmarks" | ||
| harness = false | ||
| required-features = ["std"] | ||
@@ -72,2 +85,2 @@ [dev-dependencies.criterion] | ||
| default = ["std"] | ||
| std = [] | ||
| std = ["alloc"] |
+4
-0
@@ -0,1 +1,5 @@ | ||
| # 0.21.5 | ||
| - Add `Debug` and `Clone` impls for the general purpose Engine | ||
| # 0.21.4 | ||
@@ -2,0 +6,0 @@ |
@@ -5,5 +5,5 @@ use crate::{ | ||
| }; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use alloc::string::String; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use core::str; | ||
@@ -51,3 +51,3 @@ | ||
| // A really simple sink that just appends to a string | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub(crate) struct StringSink<'a> { | ||
@@ -57,3 +57,3 @@ string: &'a mut String, | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| impl<'a> StringSink<'a> { | ||
@@ -65,3 +65,3 @@ pub(crate) fn new(s: &mut String) -> StringSink { | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| impl<'a> Sink for StringSink<'a> { | ||
@@ -68,0 +68,0 @@ type Error = (); |
+4
-4
| use crate::engine::{general_purpose::STANDARD, DecodeEstimate, Engine}; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use alloc::vec::Vec; | ||
@@ -86,3 +86,3 @@ use core::fmt; | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::decode")] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub fn decode<T: AsRef<[u8]>>(input: T) -> Result<Vec<u8>, DecodeError> { | ||
@@ -97,3 +97,3 @@ STANDARD.decode(input) | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::decode")] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub fn decode_engine<E: Engine, T: AsRef<[u8]>>( | ||
@@ -109,3 +109,3 @@ input: T, | ||
| /// See [Engine::decode_vec]. | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::decode_vec")] | ||
@@ -112,0 +112,0 @@ pub fn decode_engine_vec<E: Engine, T: AsRef<[u8]>>( |
+5
-5
@@ -1,2 +0,2 @@ | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use alloc::string::String; | ||
@@ -7,3 +7,3 @@ use core::fmt; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use crate::engine::general_purpose::STANDARD; | ||
@@ -18,3 +18,3 @@ use crate::engine::{Config, Engine}; | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::encode")] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub fn encode<T: AsRef<[u8]>>(input: T) -> String { | ||
@@ -29,3 +29,3 @@ STANDARD.encode(input) | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::encode")] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub fn encode_engine<E: Engine, T: AsRef<[u8]>>(input: T, engine: &E) -> String { | ||
@@ -40,3 +40,3 @@ engine.encode(input) | ||
| #[deprecated(since = "0.21.0", note = "Use Engine::encode_string")] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub fn encode_engine_string<E: Engine, T: AsRef<[u8]>>( | ||
@@ -43,0 +43,0 @@ input: T, |
@@ -22,2 +22,4 @@ //! Provides the [GeneralPurpose] engine and associated config types. | ||
| /// - It is not constant-time, though, so it is vulnerable to timing side-channel attacks. For loading cryptographic keys, etc, it is suggested to use the forthcoming constant-time implementation. | ||
| #[derive(Debug, Clone)] | ||
| pub struct GeneralPurpose { | ||
@@ -24,0 +26,0 @@ encode_table: [u8; 64], |
| //! Provides the [Engine] abstraction and out of the box implementations. | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use crate::chunked_encoder; | ||
@@ -8,6 +8,6 @@ use crate::{ | ||
| }; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use alloc::vec::Vec; | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| use alloc::{string::String, vec}; | ||
@@ -117,3 +117,3 @@ | ||
| /// let b64_url = CUSTOM_ENGINE.encode(b"hello internet~"); | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| #[inline] | ||
@@ -158,3 +158,3 @@ fn encode<T: AsRef<[u8]>>(&self, input: T) -> String { | ||
| /// ``` | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| #[inline] | ||
@@ -184,3 +184,4 @@ fn encode_string<T: AsRef<[u8]>>(&self, input: T, output_buf: &mut String) { | ||
| /// | ||
| /// ```rust | ||
| #[cfg_attr(feature = "alloc", doc = "```")] | ||
| #[cfg_attr(not(feature = "alloc"), doc = "```ignore")] | ||
| /// use base64::{Engine as _, engine::general_purpose}; | ||
@@ -248,3 +249,3 @@ /// let s = b"hello internet!"; | ||
| /// ``` | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| #[inline] | ||
@@ -301,3 +302,3 @@ fn decode<T: AsRef<[u8]>>(&self, input: T) -> Result<Vec<u8>, DecodeError> { | ||
| /// ``` | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| #[inline] | ||
@@ -304,0 +305,0 @@ fn decode_vec<T: AsRef<[u8]>>( |
@@ -9,4 +9,3 @@ use crate::{ | ||
| }; | ||
| use alloc::ops::BitOr; | ||
| use std::ops::{BitAnd, Shl, Shr}; | ||
| use std::ops::{BitAnd, BitOr, Shl, Shr}; | ||
@@ -13,0 +12,0 @@ /// Comparatively simple implementation that can be used as something to compare against in tests |
+7
-7
@@ -84,3 +84,4 @@ //! # Getting started | ||
| //! | ||
| //! ``` | ||
| #![cfg_attr(feature = "alloc", doc = "```")] | ||
| #![cfg_attr(not(feature = "alloc"), doc = "```ignore")] | ||
| //! use base64::{Engine as _, engine::general_purpose}; | ||
@@ -99,3 +100,4 @@ //! | ||
| //! | ||
| //! ``` | ||
| #![cfg_attr(feature = "alloc", doc = "```")] | ||
| #![cfg_attr(not(feature = "alloc"), doc = "```ignore")] | ||
| //! use base64::{engine, alphabet, Engine as _}; | ||
@@ -141,6 +143,4 @@ //! | ||
| #[cfg(all(feature = "alloc", not(any(feature = "std", test))))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| extern crate alloc; | ||
| #[cfg(any(feature = "std", test))] | ||
| extern crate std as alloc; | ||
@@ -165,3 +165,3 @@ // has to be included at top level because of the way rstest_reuse defines its macros | ||
| #[allow(deprecated)] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub use crate::encode::{encode, encode_engine, encode_engine_string}; | ||
@@ -173,3 +173,3 @@ #[allow(deprecated)] | ||
| #[allow(deprecated)] | ||
| #[cfg(any(feature = "alloc", feature = "std", test))] | ||
| #[cfg(any(feature = "alloc", test))] | ||
| pub use crate::decode::{decode, decode_engine, decode_engine_vec}; | ||
@@ -176,0 +176,0 @@ #[allow(deprecated)] |
+2
-1
@@ -8,3 +8,4 @@ //! Preconfigured engines for common use cases. | ||
| //! | ||
| //! ``` | ||
| #![cfg_attr(feature = "alloc", doc = "```")] | ||
| #![cfg_attr(not(feature = "alloc"), doc = "```ignore")] | ||
| //! use base64::prelude::{Engine as _, BASE64_STANDARD_NO_PAD}; | ||
@@ -11,0 +12,0 @@ //! |
@@ -79,3 +79,3 @@ use std::{ | ||
| } | ||
| Ok(read) if read == 0 => break, | ||
| Ok(0) => break, | ||
| Ok(_) => (), | ||
@@ -82,0 +82,0 @@ } |
Sorry, the diff of this file is not supported yet