1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 04:27:45 +00:00

factor::numeric::gcd: Silence the (erroneous) dead code lint

This commit is contained in:
nicoo 2020-06-16 15:45:10 +02:00
parent 334e02786d
commit d1470dadf8

View file

@ -9,7 +9,10 @@
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 {
a %= b;
swap(&mut a, &mut b);