This commit is contained in:
sylvestre
2023-07-30 02:31:29 +00:00
parent b409f73eae
commit 1b6ac626ff
5 changed files with 6 additions and 16 deletions
+1 -1
View File
@@ -1032,7 +1032,7 @@
}
<span class="kw">match </span>rename(sourcepath, <span class="kw-2">&amp;</span>targetpath, b, multi_progress.as_ref()) {
<span class="prelude-val">Err</span>(e) <span class="kw">if </span>e.to_string() == <span class="string">&quot;&quot; </span>=&gt; set_exit_code(<span class="number">1</span>),
<span class="prelude-val">Err</span>(e) <span class="kw">if </span>e.to_string().is_empty() =&gt; set_exit_code(<span class="number">1</span>),
<span class="prelude-val">Err</span>(e) =&gt; {
<span class="kw">let </span>e = e.map_err_context(|| {
<span class="macro">format!</span>(
+1 -1
View File
@@ -303,7 +303,7 @@
<span class="kw">if </span>opts.parents {
<span class="kw">while let </span><span class="prelude-val">Some</span>(new) = path.parent() {
path = new;
<span class="kw">if </span>path.as_os_str() == <span class="string">&quot;&quot; </span>{
<span class="kw">if </span>path.as_os_str().is_empty() {
<span class="kw">break</span>;
}
remove_single(path, opts)<span class="question-mark">?</span>;
+1 -1
View File
@@ -203,7 +203,7 @@
<span class="prelude-val">Ok</span>(n) <span class="kw">if </span>n != <span class="number">0 </span>=&gt; {
bytes_read += n;
<span class="kw">for </span><span class="kw-2">&amp;</span>byte <span class="kw">in </span>buf[..n].iter() {
checksum = (checksum &gt;&gt; <span class="number">1</span>) + ((checksum &amp; <span class="number">1</span>) &lt;&lt; <span class="number">15</span>);
checksum = checksum.rotate_right(<span class="number">1</span>);
checksum = checksum.wrapping_add(u16::from(byte));
}
}
+2 -12
View File
@@ -174,11 +174,6 @@
<a href="#174" id="174">174</a>
<a href="#175" id="175">175</a>
<a href="#176" id="176">176</a>
<a href="#177" id="177">177</a>
<a href="#178" id="178">178</a>
<a href="#179" id="179">179</a>
<a href="#180" id="180">180</a>
<a href="#181" id="181">181</a>
</pre></div><pre class="rust"><code><span class="comment">// * This file is part of the uutils coreutils package.
// *
// * (c) Ben Eggers &lt;ben.eggers36@gmail.com&gt;
@@ -352,12 +347,7 @@
}
<span class="kw">fn </span>is_acyclic(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
<span class="kw">for </span>edges <span class="kw">in </span><span class="self">self</span>.out_edges.values() {
<span class="kw">if </span>!edges.is_empty() {
<span class="kw">return </span><span class="bool-val">false</span>;
}
}
<span class="bool-val">true
</span>}
<span class="self">self</span>.out_edges.values().all(|edge| edge.is_empty())
}
}
</code></pre></div></section></main></body></html>
File diff suppressed because one or more lines are too long