From 289cec36efb012649fce64aa88463f6913420551 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Apr 2024 12:56:33 -0400 Subject: [PATCH] keyfork wizard: upcast i and index to avoid wrapping add --- crates/keyfork/src/cli/wizard.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/keyfork/src/cli/wizard.rs b/crates/keyfork/src/cli/wizard.rs index abdbed5..a054a4d 100644 --- a/crates/keyfork/src/cli/wizard.rs +++ b/crates/keyfork/src/cli/wizard.rs @@ -132,8 +132,8 @@ fn generate_shard_secret( for i in 0..keys_per_shard { pm.prompt_message(Message::Text(format!( "Please remove all keys and insert key #{} for user #{}", - i + 1, - index + 1, + (i as u16) + 1, + (index as u16) + 1, )))?; let card_backend = loop { if let Some(c) = PcscBackend::cards(None)?.next().transpose()? {