Skip to content

Commit feb5563

Browse files
committed
deploy: 055173b
1 parent 3cf8b3e commit feb5563

File tree

11 files changed

+121
-69
lines changed

11 files changed

+121
-69
lines changed

dev/settings.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<!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="Settings of Rustdoc"><meta name="keywords" content="rust, rustlang, rust-lang"><title>Rustdoc settings</title><link rel="stylesheet" type="text/css" href="./normalize.css"><link rel="stylesheet" type="text/css" href="./rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="./light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="./dark.css" disabled ><link rel="stylesheet" type="text/css" href="./ayu.css" disabled ><link rel="stylesheet" type="text/css" href="./settings.css" ><script id="default-settings" ></script><script src="./storage.js"></script><script src="./crates.js"></script><script defer src="./main.js"></script>
2-
<noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="alternate icon" type="image/png" href="./favicon-16x16.png"><link rel="alternate icon" type="image/png" href="./favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="./favicon.svg"><style type="text/css">#crate-search{background-image:url("./down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='./uudoc/index.html'><div class='logo-container rust-logo'><img src='./rust-logo.png' alt='logo'></div></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="./brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="./settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="./wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><div class="settings"><div class="setting-line"><div class="title">Theme preferences</div><div class="sub-settings"><div class="setting-line"><label class="toggle"><input type="checkbox" id="use-system-theme" checked><span class="slider"></span></label><div>Use system theme</div></div><div class="setting-line"><div>Preferred dark theme</div><label class="select-wrapper"><select id="preferred-dark-theme" autocomplete="off"><option value="light" >light</option><option value="dark" selected>dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div><div class="setting-line"><div>Preferred light theme</div><label class="select-wrapper"><select id="preferred-light-theme" autocomplete="off"><option value="light" selected>light</option><option value="dark" >dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div></div>
3-
</div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-large-items" checked><span class="slider"></span></label><div>Auto-hide item contents for large items.</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-method-docs" ><span class="slider"></span></label><div>Auto-hide item methods' documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-trait-implementations" ><span class="slider"></span></label><div>Auto-hide trait implementation documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="go-to-only-result" ><span class="slider"></span></label><div>Directly go to item in search if there is only one result</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="line-numbers" ><span class="slider"></span></label><div>Show line numbers on code examples</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="disable-shortcuts" ><span class="slider"></span></label><div>Disable keyboard shortcuts</div></div></div><script src="./settings.js"></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="./" data-current-crate="uudoc" data-search-index-js="./search-index.js" data-search-js="./search.js"></div>
2+
<noscript><link rel="stylesheet" href="./noscript.css"></noscript><link rel="alternate icon" type="image/png" href="./favicon-16x16.png"><link rel="alternate icon" type="image/png" href="./favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="./favicon.svg"><style type="text/css">#crate-search{background-image:url("./down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='./stdbuf/index.html'><div class='logo-container rust-logo'><img src='./rust-logo.png' alt='logo'></div></a><h2 class="location">Settings</h2><div class="sidebar-elems"></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="./brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="./settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="./wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Rustdoc settings</span></h1><div class="settings"><div class="setting-line"><div class="title">Theme preferences</div><div class="sub-settings"><div class="setting-line"><label class="toggle"><input type="checkbox" id="use-system-theme" checked><span class="slider"></span></label><div>Use system theme</div></div><div class="setting-line"><div>Preferred dark theme</div><label class="select-wrapper"><select id="preferred-dark-theme" autocomplete="off"><option value="light" >light</option><option value="dark" selected>dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div><div class="setting-line"><div>Preferred light theme</div><label class="select-wrapper"><select id="preferred-light-theme" autocomplete="off"><option value="light" selected>light</option><option value="dark" >dark</option><option value="ayu" >ayu</option></select><img src="./down-arrow.svg" alt="Select item"></label></div></div>
3+
</div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-large-items" checked><span class="slider"></span></label><div>Auto-hide item contents for large items.</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-method-docs" ><span class="slider"></span></label><div>Auto-hide item methods' documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="auto-hide-trait-implementations" ><span class="slider"></span></label><div>Auto-hide trait implementation documentation</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="go-to-only-result" ><span class="slider"></span></label><div>Directly go to item in search if there is only one result</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="line-numbers" ><span class="slider"></span></label><div>Show line numbers on code examples</div></div><div class="setting-line"><label class="toggle"><input type="checkbox" id="disable-shortcuts" ><span class="slider"></span></label><div>Disable keyboard shortcuts</div></div></div><script src="./settings.js"></script></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="./" data-current-crate="stdbuf" data-search-index-js="./search-index.js" data-search-js="./search.js"></div>
44
</body></html>

dev/src/uu_dd/parseargs.rs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@
930930
<span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;ibs=N cannot fit into memory&quot;</span>)
931931
}
932932
<span class="ident">ParseError::ObsOutOfRange</span> =&gt; {
933-
<span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;ibs=N cannot fit into memory&quot;</span>)
933+
<span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;obs=N cannot fit into memory&quot;</span>)
934934
}
935935
<span class="ident">ParseError::CbsOutOfRange</span> =&gt; {
936936
<span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;cbs=N cannot fit into memory&quot;</span>)

dev/src/uu_df/df.rs.html

Lines changed: 87 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,45 @@
407407
<span id="406">406</span>
408408
<span id="407">407</span>
409409
<span id="408">408</span>
410+
<span id="409">409</span>
411+
<span id="410">410</span>
412+
<span id="411">411</span>
413+
<span id="412">412</span>
414+
<span id="413">413</span>
415+
<span id="414">414</span>
416+
<span id="415">415</span>
417+
<span id="416">416</span>
418+
<span id="417">417</span>
419+
<span id="418">418</span>
420+
<span id="419">419</span>
421+
<span id="420">420</span>
422+
<span id="421">421</span>
423+
<span id="422">422</span>
424+
<span id="423">423</span>
425+
<span id="424">424</span>
426+
<span id="425">425</span>
427+
<span id="426">426</span>
428+
<span id="427">427</span>
429+
<span id="428">428</span>
430+
<span id="429">429</span>
431+
<span id="430">430</span>
432+
<span id="431">431</span>
433+
<span id="432">432</span>
434+
<span id="433">433</span>
435+
<span id="434">434</span>
436+
<span id="435">435</span>
437+
<span id="436">436</span>
438+
<span id="437">437</span>
439+
<span id="438">438</span>
440+
<span id="439">439</span>
441+
<span id="440">440</span>
442+
<span id="441">441</span>
443+
<span id="442">442</span>
444+
<span id="443">443</span>
445+
<span id="444">444</span>
446+
<span id="445">445</span>
447+
<span id="446">446</span>
448+
<span id="447">447</span>
410449
</pre><pre class="rust"><code><span class="comment">// This file is part of the uutils coreutils package.</span>
411450
<span class="comment">//</span>
412451
<span class="comment">// (c) Fangxu Hu &lt;framlog@gmail.com&gt;</span>
@@ -470,15 +509,60 @@
470509
<span class="ident">exclude</span>: <span class="ident">HashSet</span><span class="op">&lt;</span><span class="ident">String</span><span class="op">&gt;</span>,
471510
}
472511

512+
<span class="doccomment">/// A block size to use in condensing the display of a large number of bytes.</span>
513+
<span class="doccomment">///</span>
514+
<span class="doccomment">/// The [`Bytes`] variant represents a static block size. The</span>
515+
<span class="doccomment">/// [`HumanReadableDecimal`] and [`HumanReadableBinary`] variants</span>
516+
<span class="doccomment">/// represent dynamic block sizes: as the number of bytes increases,</span>
517+
<span class="doccomment">/// the divisor increases as well (for example, from 1 to 1,000 to</span>
518+
<span class="doccomment">/// 1,000,000 and so on in the case of [`HumanReadableDecimal`]).</span>
519+
<span class="doccomment">///</span>
520+
<span class="doccomment">/// The default variant is `Bytes(1024)`.</span>
521+
<span class="kw">enum</span> <span class="ident">BlockSize</span> {
522+
<span class="doccomment">/// A fixed number of bytes.</span>
523+
<span class="doccomment">///</span>
524+
<span class="doccomment">/// The number must be positive.</span>
525+
<span class="ident">Bytes</span>(<span class="ident">u64</span>),
526+
527+
<span class="doccomment">/// Use the largest divisor corresponding to a unit, like B, K, M, G, etc.</span>
528+
<span class="doccomment">///</span>
529+
<span class="doccomment">/// This variant represents powers of 1,000. Contrast with</span>
530+
<span class="doccomment">/// [`HumanReadableBinary`], which represents powers of 1,024.</span>
531+
<span class="ident">HumanReadableDecimal</span>,
532+
533+
<span class="doccomment">/// Use the largest divisor corresponding to a unit, like B, K, M, G, etc.</span>
534+
<span class="doccomment">///</span>
535+
<span class="doccomment">/// This variant represents powers of 1,000. Contrast with</span>
536+
<span class="doccomment">/// [`HumanReadableBinary`], which represents powers of 1,024.</span>
537+
<span class="ident">HumanReadableBinary</span>,
538+
}
539+
540+
<span class="kw">impl</span> <span class="ident">Default</span> <span class="kw">for</span> <span class="ident">BlockSize</span> {
541+
<span class="kw">fn</span> <span class="ident">default</span>() -&gt; <span class="self">Self</span> {
542+
<span class="ident"><span class="self">Self</span>::Bytes</span>(<span class="number">1024</span>)
543+
}
544+
}
545+
546+
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="kw-2">&amp;</span><span class="ident">ArgMatches</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">BlockSize</span> {
547+
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">matches</span>: <span class="kw-2">&amp;</span><span class="ident">ArgMatches</span>) -&gt; <span class="self">Self</span> {
548+
<span class="kw">if</span> <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_HUMAN_READABLE</span>) {
549+
<span class="ident"><span class="self">Self</span>::HumanReadableBinary</span>
550+
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_HUMAN_READABLE_2</span>) {
551+
<span class="ident"><span class="self">Self</span>::HumanReadableDecimal</span>
552+
} <span class="kw">else</span> {
553+
<span class="ident"><span class="self">Self</span>::default</span>()
554+
}
555+
}
556+
}
557+
473558
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Default</span>)]</span>
474559
<span class="kw">struct</span> <span class="ident">Options</span> {
475560
<span class="ident">show_local_fs</span>: <span class="ident">bool</span>,
476561
<span class="ident">show_all_fs</span>: <span class="ident">bool</span>,
477562
<span class="ident">show_listed_fs</span>: <span class="ident">bool</span>,
478563
<span class="ident">show_fs_type</span>: <span class="ident">bool</span>,
479564
<span class="ident">show_inode_instead</span>: <span class="ident">bool</span>,
480-
<span class="comment">// block_size: usize,</span>
481-
<span class="ident">human_readable_base</span>: <span class="ident">i64</span>,
565+
<span class="ident">block_size</span>: <span class="ident">BlockSize</span>,
482566
<span class="ident">fs_selector</span>: <span class="ident">FsSelector</span>,
483567
}
484568

@@ -491,13 +575,7 @@
491575
<span class="ident">show_listed_fs</span>: <span class="bool-val">false</span>,
492576
<span class="ident">show_fs_type</span>: <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_PRINT_TYPE</span>),
493577
<span class="ident">show_inode_instead</span>: <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_INODES</span>),
494-
<span class="ident">human_readable_base</span>: <span class="kw">if</span> <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_HUMAN_READABLE</span>) {
495-
<span class="number">1024</span>
496-
} <span class="kw">else</span> <span class="kw">if</span> <span class="ident">matches</span>.<span class="ident">is_present</span>(<span class="ident">OPT_HUMAN_READABLE_2</span>) {
497-
<span class="number">1000</span>
498-
} <span class="kw">else</span> {
499-
<span class="op">-</span><span class="number">1</span>
500-
},
578+
<span class="ident">block_size</span>: <span class="ident">BlockSize::from</span>(<span class="ident">matches</span>),
501579
<span class="ident">fs_selector</span>: <span class="ident">FsSelector::from</span>(<span class="ident">matches</span>),
502580
}
503581
}

0 commit comments

Comments
 (0)