mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 20:47:46 +00:00
factor::numeric::gcd: Silence the (erroneous) dead code lint
This commit is contained in:
parent
334e02786d
commit
d1470dadf8
1 changed files with 4 additions and 1 deletions
|
@ -9,7 +9,10 @@
|
||||||
|
|
||||||
use std::mem::swap;
|
use std::mem::swap;
|
||||||
|
|
||||||
pub fn gcd(mut a: u64, mut b: u64) -> u64 {
|
// This is incorrectly reported as dead code,
|
||||||
|
// presumably when included in build.rs.
|
||||||
|
#[allow(dead_code)]
|
||||||
|
pub(crate) fn gcd(mut a: u64, mut b: u64) -> u64 {
|
||||||
while b > 0 {
|
while b > 0 {
|
||||||
a %= b;
|
a %= b;
|
||||||
swap(&mut a, &mut b);
|
swap(&mut a, &mut b);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue