Skip to content

Commit 92852d4

Browse files
committed
deploy: f0e8d44
1 parent 10bd756 commit 92852d4

15 files changed

+37
-53
lines changed

dev/src/uu_sort/chunks.rs.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@
319319
<a href="#319" id="319">319</a>
320320
<a href="#320" id="320">320</a>
321321
<a href="#321" id="321">321</a>
322+
<a href="#322" id="322">322</a>
322323
</pre></div><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
323324
// *
324325
// * (c) Michael Debertol &lt;michael.debertol..AT..gmail.com&gt;
@@ -337,21 +338,22 @@
337338
};
338339

339340
<span class="kw">use </span>memchr::memchr_iter;
340-
<span class="kw">use </span>ouroboros::self_referencing;
341+
<span class="kw">use </span>self_cell::self_cell;
341342
<span class="kw">use </span>uucore::error::{UResult, USimpleError};
342343

343344
<span class="kw">use crate</span>::{numeric_str_cmp::NumInfo, GeneralF64ParseResult, GlobalSettings, Line, SortError};
344345

345-
<span class="doccomment">/// The chunk that is passed around between threads.
346-
/// `lines` consist of slices into `buffer`.
347-
</span><span class="attr">#[self_referencing(pub_extras)]
348-
#[derive(Debug)]
349-
</span><span class="kw">pub struct </span>Chunk {
350-
<span class="kw">pub </span>buffer: Vec&lt;u8&gt;,
351-
<span class="attr">#[borrows(buffer)]
352-
#[covariant]
353-
</span><span class="kw">pub </span>contents: ChunkContents&lt;<span class="lifetime">&#39;this</span>&gt;,
354-
}
346+
<span class="macro">self_cell!</span>(
347+
<span class="doccomment">/// The chunk that is passed around between threads.
348+
</span><span class="kw">pub struct </span>Chunk {
349+
owner: Vec&lt;u8&gt;,
350+
351+
<span class="attr">#[covariant]
352+
</span>dependent: ChunkContents,
353+
}
354+
355+
<span class="kw">impl </span>{Debug}
356+
);
355357

356358
<span class="attr">#[derive(Debug)]
357359
</span><span class="kw">pub struct </span>ChunkContents&lt;<span class="lifetime">&#39;a</span>&gt; {
@@ -369,7 +371,7 @@
369371
<span class="kw">impl </span>Chunk {
370372
<span class="doccomment">/// Destroy this chunk and return its components to be reused.
371373
</span><span class="kw">pub fn </span>recycle(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; RecycledChunk {
372-
<span class="kw">let </span>recycled_contents = <span class="self">self</span>.with_contents_mut(|contents| {
374+
<span class="kw">let </span>recycled_contents = <span class="self">self</span>.with_dependent_mut(|<span class="kw">_</span>, contents| {
373375
contents.lines.clear();
374376
contents.line_data.selections.clear();
375377
contents.line_data.num_infos.clear();
@@ -402,15 +404,15 @@
402404
selections: recycled_contents.<span class="number">1</span>,
403405
num_infos: recycled_contents.<span class="number">2</span>,
404406
parsed_floats: recycled_contents.<span class="number">3</span>,
405-
buffer: <span class="self">self</span>.into_heads().buffer,
407+
buffer: <span class="self">self</span>.into_owner(),
406408
}
407409
}
408410

409411
<span class="kw">pub fn </span>lines(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>Vec&lt;Line&gt; {
410-
<span class="kw-2">&amp;</span><span class="self">self</span>.borrow_contents().lines
412+
<span class="kw-2">&amp;</span><span class="self">self</span>.borrow_dependent().lines
411413
}
412414
<span class="kw">pub fn </span>line_data(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span>LineData {
413-
<span class="kw-2">&amp;</span><span class="self">self</span>.borrow_contents().line_data
415+
<span class="kw-2">&amp;</span><span class="self">self</span>.borrow_dependent().line_data
414416
}
415417
}
416418

dev/src/uu_sort/ext_sort.rs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@
444444
<span class="doccomment">/// The function that is executed on the sorter thread.
445445
</span><span class="kw">fn </span>sorter(receiver: <span class="kw-2">&amp;</span>Receiver&lt;Chunk&gt;, sender: <span class="kw-2">&amp;</span>SyncSender&lt;Chunk&gt;, settings: <span class="kw-2">&amp;</span>GlobalSettings) {
446446
<span class="kw">while let </span><span class="prelude-val">Ok</span>(<span class="kw-2">mut </span>payload) = receiver.recv() {
447-
payload.with_contents_mut(|contents| {
447+
payload.with_dependent_mut(|<span class="kw">_</span>, contents| {
448448
sort_by(<span class="kw-2">&amp;mut </span>contents.lines, settings, <span class="kw-2">&amp;</span>contents.line_data);
449449
});
450450
<span class="kw">if </span>sender.send(payload).is_err() {

dev/src/uu_sort/merge.rs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@
843843
file_number: file.file_number,
844844
});
845845

846-
file.current_chunk.with_contents(|contents| {
846+
file.current_chunk.with_dependent(|<span class="kw">_</span>, contents| {
847847
<span class="kw">let </span>current_line = <span class="kw-2">&amp;</span>contents.lines[file.line_idx];
848848
<span class="kw">if </span>settings.unique {
849849
<span class="kw">if let </span><span class="prelude-val">Some</span>(prev) = <span class="kw-2">&amp;</span>prev {

dev/src/uucore/mods/error.rs.html

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,6 @@
765765
<a href="#765" id="765">765</a>
766766
<a href="#766" id="766">766</a>
767767
<a href="#767" id="767">767</a>
768-
<a href="#768" id="768">768</a>
769-
<a href="#769" id="769">769</a>
770-
<a href="#770" id="770">770</a>
771-
<a href="#771" id="771">771</a>
772-
<a href="#772" id="772">772</a>
773-
<a href="#773" id="773">773</a>
774-
<a href="#774" id="774">774</a>
775-
<a href="#775" id="775">775</a>
776-
<a href="#776" id="776">776</a>
777768
</pre></div><pre class="rust"><code><span class="comment">// TODO fix broken links
778769
</span><span class="attr">#![allow(rustdoc::broken_intra_doc_links)]
779770
</span><span class="doccomment">//! All utils return exit with an exit code. Usually, the following scheme is used:
@@ -1172,7 +1163,7 @@
11721163
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>Formatter&lt;<span class="lifetime">&#39;_</span>&gt;) -&gt; <span class="prelude-ty">Result</span>&lt;(), std::fmt::Error&gt; {
11731164
<span class="kw">use </span>std::io::ErrorKind::<span class="kw-2">*</span>;
11741165

1175-
<span class="kw">let </span><span class="kw-2">mut </span>message;
1166+
<span class="kw">let </span>message;
11761167
<span class="kw">let </span>message = <span class="kw">if </span><span class="self">self</span>.inner.raw_os_error().is_some() {
11771168
<span class="comment">// These are errors that come directly from the OS.
11781169
// We want to normalize their messages across systems,
@@ -1200,7 +1191,6 @@
12001191
// (https://github.com/rust-lang/rust/issues/86442)
12011192
// are stabilized, we should add them to the match statement.
12021193
</span>message = strip_errno(<span class="kw-2">&amp;</span><span class="self">self</span>.inner);
1203-
capitalize(<span class="kw-2">&amp;mut </span>message);
12041194
<span class="kw-2">&amp;</span>message
12051195
}
12061196
}
@@ -1211,7 +1201,6 @@
12111201
// a file that was not found.
12121202
// There are also errors with entirely custom messages.
12131203
</span>message = <span class="self">self</span>.inner.to_string();
1214-
capitalize(<span class="kw-2">&amp;mut </span>message);
12151204
<span class="kw-2">&amp;</span>message
12161205
};
12171206
<span class="kw">if let </span><span class="prelude-val">Some</span>(ctx) = <span class="kw-2">&amp;</span><span class="self">self</span>.context {
@@ -1222,13 +1211,6 @@
12221211
}
12231212
}
12241213

1225-
<span class="doccomment">/// Capitalize the first character of an ASCII string.
1226-
</span><span class="kw">fn </span>capitalize(text: <span class="kw-2">&amp;mut </span>str) {
1227-
<span class="kw">if let </span><span class="prelude-val">Some</span>(first) = text.get_mut(..<span class="number">1</span>) {
1228-
first.make_ascii_uppercase();
1229-
}
1230-
}
1231-
12321214
<span class="doccomment">/// Strip the trailing &quot; (os error XX)&quot; from io error strings.
12331215
</span><span class="kw">pub fn </span>strip_errno(err: <span class="kw-2">&amp;</span>std::io::Error) -&gt; String {
12341216
<span class="kw">let </span><span class="kw-2">mut </span>msg = err.to_string();

dev/uucore/error/fn.strip_errno.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Strip the trailing “ (os error XX)“ from io error strings."><title>strip_errno in uucore::error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ba5701c5741a7b69.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uucore" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0 (90c541806 2023-05-31)" data-search-js="search-e077946657036a58.js" data-settings-js="settings-298e1ea74db45b39.js" data-settings-css="settings-7bfb4c59cc6bc502.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f61008743c98d196.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../uucore/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../uucore/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uucore::error</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">uucore</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">strip_errno</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/uucore/mods/error.rs.html#457-463">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn strip_errno(err: &amp;<a class="struct" href="https://doc.rust-lang.org/1.70.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Strip the trailing “ (os error XX)“ from io error strings.</p>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Strip the trailing “ (os error XX)“ from io error strings."><title>strip_errno in uucore::error - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-ba5701c5741a7b69.css" id="mainThemeStyle"><div id="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="uucore" data-themes="" data-resource-suffix="" data-rustdoc-version="1.70.0 (90c541806 2023-05-31)" data-search-js="search-e077946657036a58.js" data-settings-js="settings-298e1ea74db45b39.js" data-settings-css="settings-7bfb4c59cc6bc502.css" data-theme-light-css="light-0f8c037637f9eb3e.css" data-theme-dark-css="dark-1097f8e92a01e3cf.css" data-theme-ayu-css="ayu-614652228113ac93.css" ></div><script src="../../static.files/storage-62ce34ea385b278a.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-f61008743c98d196.js"></script><noscript><link rel="stylesheet" media="(prefers-color-scheme:light)" href="../../static.files/light-0f8c037637f9eb3e.css"><link rel="stylesheet" media="(prefers-color-scheme:dark)" href="../../static.files/dark-1097f8e92a01e3cf.css"><link rel="stylesheet" href="../../static.files/noscript-13285aec31fa243e.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="logo-container" href="../../uucore/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><h2></h2></nav><nav class="sidebar"><a class="logo-container" href="../../uucore/index.html"><img class="rust-logo" src="../../static.files/rust-logo-151179464ae7ed46.svg" alt="logo"></a><div class="sidebar-elems"><h2><a href="index.html">In uucore::error</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Function <a href="../index.html">uucore</a>::<wbr><a href="index.html">error</a>::<wbr><a class="fn" href="#">strip_errno</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/uucore/mods/error.rs.html#448-454">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><pre class="rust item-decl"><code>pub fn strip_errno(err: &amp;<a class="struct" href="https://doc.rust-lang.org/1.70.0/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -&gt; <a class="struct" href="https://doc.rust-lang.org/1.70.0/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Strip the trailing “ (os error XX)“ from io error strings.</p>
22
</div></details></section></div></main></body></html>

0 commit comments

Comments
 (0)