From c3316e6ad987f54797c8b11a157738722cc83c72 Mon Sep 17 00:00:00 2001 From: Avery Winters Date: Thu, 24 Oct 2024 13:04:25 -0500 Subject: [PATCH] Cleanup armstrong --- rust/armstrong-numbers/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/armstrong-numbers/src/lib.rs b/rust/armstrong-numbers/src/lib.rs index 8b024ca..a63edb6 100644 --- a/rust/armstrong-numbers/src/lib.rs +++ b/rust/armstrong-numbers/src/lib.rs @@ -6,8 +6,7 @@ pub fn is_armstrong_number(num: u32) -> bool { let divisor = 10u32.pow(i); let quotient = num / divisor; let digit = quotient % 10; - let raised = digit.pow(count); - raised + digit.pow(count) }).sum(); num == armstrong_sum }