From 585bb41a9d1baf45b596cd511fba7fe4584a5a54 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 13 May 2024 16:29:17 +0200 Subject: [PATCH] refactor: split at whitespace #1 #15 --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1071e10..342c755 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,8 +26,8 @@ fn main() { exit(1); } }; - let whole = whole.replace('\n', ""); - for s in whole.split(' ') { + let split = whole.split_whitespace(); + for s in split { args.push(s.to_string()); } }