From 82c97226f424d35130fc49bbc071e1a0e9785183 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 2 Jun 2021 17:40:43 +0100 Subject: [PATCH] otter cli: sshkeys: Get line numbers right Signed-off-by: Ian Jackson --- src/bin/otter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 85422e06..77277b6a 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -2059,7 +2059,7 @@ mod set_ssh_keys { }; let akf = BufReader::new(akf); - for (lno, l) in akf.lines().enumerate() { + for (l, lno) in akf.lines().zip(1..) { let l = l.context("read KEYS-FILE")?; let l = l.trim(); if l.starts_with("#") || l == "" { continue } -- 2.30.2