summaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-06-23 09:07:48 +0200
committerJoel Klinghed <the_jk@spawned.biz>2025-06-23 09:07:48 +0200
commitaa131024ab25c6c8c5e61ddcb195def671a62a18 (patch)
treeb0b3a7a6a7c79ebfcb82c542347a7059fcba38a9 /server/src/main.rs
parent83c24934dc0ad18b1ed1696af3949b62146a4f22 (diff)
clippy: Use more rusty for loops
Diffstat (limited to 'server/src/main.rs')
-rw-r--r--server/src/main.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index 902d023..639bf5c 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -186,8 +186,7 @@ async fn project(
// Remove linebreaks and potential openssh wrapper
fn cleanup_key(key: &str) -> String {
let mut ret = String::with_capacity(key.len());
- let mut lines = key.lines();
- while let Some(line) = lines.next() {
+ for line in key.lines() {
match line {
"-----BEGIN OPENSSH PRIVATE KEY-----" | "-----END OPENSSH PRIVATE KEY-----" => {}
_ => ret.push_str(line),