This commit is contained in:
sylvestre
2023-08-08 02:32:14 +00:00
parent e85759f9bf
commit e4c1c0d3c0
14 changed files with 25 additions and 47 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,6 +3,6 @@
"uu_numfmt":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uu_numfmt/options/struct.FormatOptions.html\" title=\"struct uu_numfmt::options::FormatOptions\">FormatOptions</a>"]],
"uu_sort":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uu_sort/struct.GlobalSettings.html\" title=\"struct uu_sort::GlobalSettings\">GlobalSettings</a>"]],
"uu_stty":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uu_stty/struct.TermSize.html\" title=\"struct uu_stty::TermSize\">TermSize</a>"]],
"uu_tail":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"uu_tail/args/enum.FilterMode.html\" title=\"enum uu_tail::args::FilterMode\">FilterMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uu_tail/args/struct.Settings.html\" title=\"struct uu_tail::args::Settings\">Settings</a>"]],
"uu_tail":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uu_tail/args/struct.Settings.html\" title=\"struct uu_tail::args::Settings\">Settings</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"enum\" href=\"uu_tail/args/enum.FilterMode.html\" title=\"enum uu_tail::args::FilterMode\">FilterMode</a>"]],
"uucore":[["impl&lt;'parser&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/default/trait.Default.html\" title=\"trait core::default::Default\">Default</a> for <a class=\"struct\" href=\"uucore/parse_size/struct.Parser.html\" title=\"struct uucore::parse_size::Parser\">Parser</a>&lt;'parser&gt;"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,9 +1,9 @@
(function() {var implementors = {
"uu_cp":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ReflinkMode.html\" title=\"enum uu_cp::ReflinkMode\">ReflinkMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.SparseMode.html\" title=\"enum uu_cp::SparseMode\">SparseMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.OverwriteMode.html\" title=\"enum uu_cp::OverwriteMode\">OverwriteMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ClobberMode.html\" title=\"enum uu_cp::ClobberMode\">ClobberMode</a>"]],
"uu_cp":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.OverwriteMode.html\" title=\"enum uu_cp::OverwriteMode\">OverwriteMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ReflinkMode.html\" title=\"enum uu_cp::ReflinkMode\">ReflinkMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.SparseMode.html\" title=\"enum uu_cp::SparseMode\">SparseMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_cp/enum.ClobberMode.html\" title=\"enum uu_cp::ClobberMode\">ClobberMode</a>"]],
"uu_kill":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_kill/enum.Mode.html\" title=\"enum uu_kill::Mode\">Mode</a>"]],
"uu_numfmt":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_numfmt/options/enum.RoundMethod.html\" title=\"enum uu_numfmt::options::RoundMethod\">RoundMethod</a>"]],
"uu_sort":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_sort/enum.GeneralF64ParseResult.html\" title=\"enum uu_sort::GeneralF64ParseResult\">GeneralF64ParseResult</a>"]],
"uu_stty":[["impl&lt;T: <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a>&gt; <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"struct\" href=\"uu_stty/struct.Flag.html\" title=\"struct uu_stty::Flag\">Flag</a>&lt;T&gt;"]],
"uu_tail":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.Signum.html\" title=\"enum uu_tail::args::Signum\">Signum</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.FollowMode.html\" title=\"enum uu_tail::args::FollowMode\">FollowMode</a>"]],
"uu_tail":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.FollowMode.html\" title=\"enum uu_tail::args::FollowMode\">FollowMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uu_tail/args/enum.Signum.html\" title=\"enum uu_tail::args::Signum\">Signum</a>"]],
"uucore":[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/quoting_style/enum.Quotes.html\" title=\"enum uucore::quoting_style::Quotes\">Quotes</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/encoding/enum.Format.html\" title=\"enum uucore::encoding::Format\">Format</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.MissingHandling.html\" title=\"enum uucore::fs::MissingHandling\">MissingHandling</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/backup_control/enum.BackupMode.html\" title=\"enum uucore::backup_control::BackupMode\">BackupMode</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/1.71.1/core/marker/trait.Copy.html\" title=\"trait core::marker::Copy\">Copy</a> for <a class=\"enum\" href=\"uucore/fs/enum.ResolveMode.html\" title=\"enum uucore::fs::ResolveMode\">ResolveMode</a>"]]
};if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -19
View File
@@ -208,14 +208,6 @@
<a href="#208" id="208">208</a>
<a href="#209" id="209">209</a>
<a href="#210" id="210">210</a>
<a href="#211" id="211">211</a>
<a href="#212" id="212">212</a>
<a href="#213" id="213">213</a>
<a href="#214" id="214">214</a>
<a href="#215" id="215">215</a>
<a href="#216" id="216">216</a>
<a href="#217" id="217">217</a>
<a href="#218" id="218">218</a>
</pre></div><pre class="rust"><code><span class="comment">// spell-checker:ignore bigint extendedbigint extendedbigdecimal
</span><span class="doccomment">//! An arbitrary precision integer that can also represent infinity, NaN, etc.
//!
@@ -283,11 +275,7 @@
<span class="self">Self</span>::BigInt(n) =&gt; n.fmt(f),
<span class="self">Self</span>::Infinity =&gt; f32::INFINITY.fmt(f),
<span class="self">Self</span>::MinusInfinity =&gt; f32::NEG_INFINITY.fmt(f),
<span class="self">Self</span>::MinusZero =&gt; {
<span class="comment">// FIXME Come up with a way of formatting this with a
// &quot;-&quot; prefix.
</span><span class="number">0</span>.fmt(f)
}
<span class="self">Self</span>::MinusZero =&gt; <span class="string">&quot;-0&quot;</span>.fmt(f),
<span class="self">Self</span>::Nan =&gt; <span class="string">&quot;nan&quot;</span>.fmt(f),
}
}
@@ -424,14 +412,10 @@
<span class="attr">#[test]
</span><span class="kw">fn </span>test_display() {
<span class="macro">assert_eq!</span>(<span class="macro">format!</span>(<span class="string">&quot;{}&quot;</span>, ExtendedBigInt::BigInt(BigInt::zero())), <span class="string">&quot;0&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="macro">format!</span>(<span class="string">&quot;{}&quot;</span>, ExtendedBigInt::MinusZero), <span class="string">&quot;-0&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="macro">format!</span>(<span class="string">&quot;{}&quot;</span>, ExtendedBigInt::Infinity), <span class="string">&quot;inf&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="macro">format!</span>(<span class="string">&quot;{}&quot;</span>, ExtendedBigInt::MinusInfinity), <span class="string">&quot;-inf&quot;</span>);
<span class="macro">assert_eq!</span>(<span class="macro">format!</span>(<span class="string">&quot;{}&quot;</span>, ExtendedBigInt::Nan), <span class="string">&quot;nan&quot;</span>);
<span class="comment">// FIXME Come up with a way of displaying negative zero as
// &quot;-0&quot;. Currently it displays as just &quot;0&quot;.
//
// assert_eq!(format!(&quot;{}&quot;, ExtendedBigInt::MinusZero), &quot;-0&quot;);
//
</span>}
}
}
</code></pre></div></section></main></body></html>
+3 -9
View File
@@ -356,9 +356,6 @@
<a href="#356" id="356">356</a>
<a href="#357" id="357">357</a>
<a href="#358" id="358">358</a>
<a href="#359" id="359">359</a>
<a href="#360" id="360">360</a>
<a href="#361" id="361">361</a>
</pre></div><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
// *
// * For the full copyright and license information, please view the LICENSE
@@ -584,16 +581,13 @@
value: <span class="kw-2">&amp;</span>ExtendedBigInt,
width: usize,
pad: bool,
is_first_iteration: bool,
) -&gt; std::io::Result&lt;()&gt; {
<span class="kw">let </span>value_as_str = <span class="kw">if </span>pad {
<span class="kw">if </span><span class="kw-2">*</span>value == ExtendedBigInt::MinusZero &amp;&amp; is_first_iteration {
<span class="macro">format!</span>(<span class="string">&quot;-{value:&gt;0width$}&quot;</span>, width = width - <span class="number">1</span>)
<span class="kw">if </span><span class="kw-2">*</span>value == ExtendedBigInt::MinusZero {
<span class="macro">format!</span>(<span class="string">&quot;{value:0&lt;width$}&quot;</span>)
} <span class="kw">else </span>{
<span class="macro">format!</span>(<span class="string">&quot;{value:&gt;0width$}&quot;</span>)
}
} <span class="kw">else if </span><span class="kw-2">*</span>value == ExtendedBigInt::MinusZero &amp;&amp; is_first_iteration {
<span class="macro">format!</span>(<span class="string">&quot;-{value}&quot;</span>)
} <span class="kw">else </span>{
<span class="macro">format!</span>(<span class="string">&quot;{value}&quot;</span>)
};
@@ -708,7 +702,7 @@
exit(<span class="number">1</span>);
}
}
<span class="prelude-val">None </span>=&gt; write_value_int(<span class="kw-2">&amp;mut </span>stdout, <span class="kw-2">&amp;</span>value, padding, pad, is_first_iteration)<span class="question-mark">?</span>,
<span class="prelude-val">None </span>=&gt; write_value_int(<span class="kw-2">&amp;mut </span>stdout, <span class="kw-2">&amp;</span>value, padding, pad)<span class="question-mark">?</span>,
}
<span class="comment">// TODO Implement augmenting addition.
</span>value = value + increment.clone();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long