From b0a4ec1c11b3a36af89d33d36ff9ddb40e5cbd88 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 --- 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()); } }