Skip to content

Commit eda6c1e

Browse files
committed
deploy: 279c5d9
1 parent ab0c2a3 commit eda6c1e

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

encoding/strings.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,16 @@ <h2 id="encode-and-decode-hex"><a class="header" href="#encode-and-decode-hex">E
234234
}</code></pre></pre>
235235
<h2 id="encode-and-decode-base64"><a class="header" href="#encode-and-decode-base64">Encode and decode base64</a></h2>
236236
<p><a href="https://docs.rs/base64/"><img src="https://badge-cache.kominick.com/crates/v/base64.svg?label=base64" alt="base64-badge" /></a> <a href="https://crates.io/categories/encoding"><img src="https://badge-cache.kominick.com/badge/encoding--x.svg?style=social" alt="cat-encoding-badge" /></a></p>
237-
<p>Encodes byte slice into <code>base64</code> String using <a href="https://docs.rs/base64/*/base64/fn.encode.html"><code>encode</code></a>
238-
and decodes it with <a href="https://docs.rs/base64/*/base64/fn.decode.html"><code>decode</code></a>.</p>
237+
<p>Encodes byte slice into <code>base64</code> String using <a href="https://docs.rs/base64/latest/base64/engine/trait.Engine.html#method.encode"><code>encode</code></a>
238+
and decodes it with <a href="https://docs.rs/base64/latest/base64/engine/trait.Engine.html#method.decode"><code>decode</code></a>.</p>
239239
<pre><pre class="playground"><code class="language-rust edition2018">use anyhow::Result;
240240
use std::str;
241-
use base64::{encode, decode};
241+
use base64::prelude::{Engine as _, BASE64_STANDARD};
242242

243243
fn main() -&gt; Result&lt;()&gt; {
244244
let hello = b"hello rustaceans";
245-
let encoded = encode(hello);
246-
let decoded = decode(&amp;encoded)?;
245+
let encoded = BASE64_STANDARD.encode(hello);
246+
let decoded = BASE64_STANDARD.decode(&amp;encoded)?;
247247

248248
println!("origin: {}", str::from_utf8(hello)?);
249249
println!("base64 encoded: {}", encoded);

print.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,16 +3015,16 @@ <h2 id="encode-and-decode-hex"><a class="header" href="#encode-and-decode-hex">E
30153015
}</code></pre></pre>
30163016
<h2 id="encode-and-decode-base64"><a class="header" href="#encode-and-decode-base64">Encode and decode base64</a></h2>
30173017
<p><a href="https://docs.rs/base64/"><img src="https://badge-cache.kominick.com/crates/v/base64.svg?label=base64" alt="base64-badge" /></a> <a href="https://crates.io/categories/encoding"><img src="https://badge-cache.kominick.com/badge/encoding--x.svg?style=social" alt="cat-encoding-badge" /></a></p>
3018-
<p>Encodes byte slice into <code>base64</code> String using <a href="https://docs.rs/base64/*/base64/fn.encode.html"><code>encode</code></a>
3019-
and decodes it with <a href="https://docs.rs/base64/*/base64/fn.decode.html"><code>decode</code></a>.</p>
3018+
<p>Encodes byte slice into <code>base64</code> String using <a href="https://docs.rs/base64/latest/base64/engine/trait.Engine.html#method.encode"><code>encode</code></a>
3019+
and decodes it with <a href="https://docs.rs/base64/latest/base64/engine/trait.Engine.html#method.decode"><code>decode</code></a>.</p>
30203020
<pre><pre class="playground"><code class="language-rust edition2018">use anyhow::Result;
30213021
use std::str;
3022-
use base64::{encode, decode};
3022+
use base64::prelude::{Engine as _, BASE64_STANDARD};
30233023

30243024
fn main() -&gt; Result&lt;()&gt; {
30253025
let hello = b"hello rustaceans";
3026-
let encoded = encode(hello);
3027-
let decoded = decode(&amp;encoded)?;
3026+
let encoded = BASE64_STANDARD.encode(hello);
3027+
let decoded = BASE64_STANDARD.decode(&amp;encoded)?;
30283028

30293029
println!("origin: {}", str::from_utf8(hello)?);
30303030
println!("base64 encoded: {}", encoded);

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)